Todo list made with golang and chi
Requirements:
- make
- docker
Start the development container
make dev
curl --location 'http://localhost:8080/register' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Vinicius",
"email": "vinicius@gmail.com",
"password": "123"
}'
curl --location 'http://localhost:8080/login' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "vinicius@gmail.com",
"password": "123"
}'
All private endpoints require a bearer token in Authorization header
curl --location 'http://localhost:8080/user/:id' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>'
curl --location 'http://localhost:8080/task' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
"name": "task one",
"priority": "HIGH",
"description": "my task description",
"release_date": "2024-04-15T12:00:00Z"
}'
curl --location 'http://localhost:8080/task' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>'
curl --location --request PATCH 'http://localhost:8080/task/:id' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
"priority": "MEDIUM"
}'
curl --location --request DELETE 'http://localhost:8081/task/:id' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>'