Currently this can be ran as 2 different applications, either a local cobra cli application, or a more limited web app powered by REST.
- Create a task
- View a task
- Update the status of a task
- Remove a task once its in a completed status
// cobra cli application
data.OpenDatabase()
cmd.Execute()
// to run as a webserver
srv := api.NewServer()
http.ListenAndServe(":8080", srv)
To run this there is a file called api/tasks.rest which allows you to run GET, POST and DELETEs. To use this simply click the "send request" hyperlink within the file in VS code.
go get github.com/chrisbarrott/task-list
To compile this package on Windows, you must have the gcc compiler installed.
Install a Windows gcc toolchain.
- Add the bin folder to the Windows path, if the installer did not do this by default.
- Open a terminal for the TDM-GCC toolchain, which can be found in the Windows Start menu.
- Navigate to your project folder and run the go build ... command for this package.
- For example the TDM-GCC Toolchain can be found here: https://jmeubank.github.io/tdm-gcc/
The cli uses Cobra, so once the package is imported you run commands like these examples:
- .\task-list init
- .\task-list task new
- .\task-list task list
- .\task-list task updateStatus
Run .\task-list for more instructions
API capability to run the app in a web service and to be able to control the app by REST