To run the API:
docker-compose up -d
runs the postgresdb Docker containergo run main.go
starts the server
The API will be running on localhost:5000.
These are the available endpoints:
POST /api/todolists
create a todo listGET /api/todolists
get all todo listsGET /api/todolists/{id}
get a todo list by idPUT /api/todolists/{id}
update a todo list by idDELETE /api/todolists/{id}
delete a todo list by idPOST /api/todolists/{id}/todos
create a todo in the todo listGET /api/todolists/{id}/todos
get all todos in a todo listGET /api/todolists/{id}/todos/{todoId}
get a todo in a todo listPUT /api/todolists/{id}/todos/{todoId}
update a todo in a todo listDELETE /api/todolists/{id}/todos/{todoId}
delete a todo in a todo list