This project was aimed more at applying basic concepts that can guide you or even give you a 'north' where you could start. I would also like to thank @Yago for challenging me to achieve this goal, making it possible for me to apply these concepts in the best way possible.
- Create Tasks
- Update existing Tasks by ID
- Get all Tasks's
- Get Tasks by ID
- Delete Tasks by ID
- GET /tarefas
Parameter | Type | Description |
---|---|---|
api_key |
string |
Required. Your API key |
curl http://localhost:{$PORT}/tarefas
- GET /tarefas/{ID}
Parameter | Type | Description |
---|---|---|
id |
number |
Required. Id of item to fetch |
curl http://localhost:{$PORT}/tarefas/{id}
- POST /tarefas
Parameter | Type | Description |
---|---|---|
titulo |
string |
Required. title of the item to be created |
curl -X POST -H "Content-Type: application/json" -d '{"titulo": "Nova Tarefa"}' http://localhost:{$PORT}/tarefas
- PUT /tarefas/{ID}
Parameter | Type | Description |
---|---|---|
id |
number |
Required. Id of item to fetch |
title |
number |
Required. tTitle of the item to be updated |
curl -X PUT -H "Content-Type: application/json" -d '{"titulo": "Novo Título"}' http://localhost:{$PORT}/tarefas/{id}
- DELETE /tarefas/{ID}
Parameter | Type | Description |
---|---|---|
id |
number |
Required. Id of item to delete |
curl -X DELETE http://localhost:{$PORT}/tarefas/{id}
Clone the project
git clone https://github.com/MIKEMARQUEZINI/API_ToDo.git
Go to the project directory
cd API_ToDo
Install dependencies
npm install
Start the server
npx tsc && node dist/app.js