This is a simple todo list application written in Go.
- Go 1.22 or later
go get github.com/pddg/go-sample-todo
Running in-memory mode. This mode does not require any database.
./go-sample-todo -in-memory
Running with MySQL.
./go-sample-todo -mysql-host=localhost -mysql-port=3306 -mysql-user=root -mysql-password=root
Get all todos.
curl -X GET http://localhost:8080/todo
Create a new todo.
curl -X POST -H "Content-Type: application/json" -d '{"task": "Buy milk"}' http://localhost:8080/todo
Delete a todo.
curl -X DELETE http://localhost:8080/todo/1
- pddg