This is a To Do api. You can create an postgress docker an keep database there.
docker run --name todoapipg -e -p 5432:5432 POSTGRES_PASSWORD=mysecretpassword -d postgres
go mod tidy
make run
- create an postgres docker container and bind port 5432 of container to 5432 of your host machine
- download necessary module (which should not more than few)
- build and run the project
{
"jwt-token": [token]
}
// example request body (json):
{
"first_name": "Umut",
"last_name": "Ozkan",
"password": "supersecretpassword"
}
example /account/3
// example request body (json):
{
// list of todos to add
"add": [
{
status = false,
context = "Fix delete account bugs"
},
...
],
// list of todos to change status
// number: number (something like a todo id) of this todo belonging to account
// done: is goal done or not
"status_change" : [
{
"number": 2,
"done": true
},
...
],
// list of todo numbers to delete
"delete": [
4,
5,
6
]
}
// example request body (json):
{
"password": "supersecretpassord"
}
example /login/15
// example request body (json):
{
"password": "supersecretpassord"
}