Repositório criado para o desenvolvimento e entrega do desafio da trilha Ignite NodeJS da 💜Rocketseat
- Javascript
- NodeJS
- CSV Parse
- GitHub
Nesse desafio foi desenvolvido uma API para realizar o CRUD de tarefas. A API também contém rota para marcar a tarefa com completa e foi desenvolvido uma importação de arquivo CSV
npm install
npm run dev
npm run import
A API REST para o aplicativo de exemplo é descrita abaixo.
GET /tasks/
curl --request GET \
--url http://localhost:3333/tasks \
--header 'Content-type: application/json'
Content-type: application/json
Date: Mon, 29 May 2023 10:49:03 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Content-Length: 2
200 Ok
[]
POST /tasks/
curl --request POST \
--url http://localhost:3333/tasks \
--header 'Content-Type: application/json' \
--data '{
"title": "TÃtulo da tarefa",
"description": "Descrição da tarefa"
}'
Content-type: application/json
Date: Mon, 29 May 2023 10:50:14 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Transfer-Encoding: chunked
201 Created
No body returned for response
PUT /tasks/:id
curl --request PUT \
--url http://localhost:3333/tasks/02729739-8b1a-4cb7-8365-2a52c1dfc024 \
--header 'Content-Type: application/json' \
--data '{
"title": "Editar tÃtulo",
"description": "Editar descrição"
}'
Content-type: application/json
Date: Mon, 29 May 2023 10:56:38 GMT
Connection: keep-alive
Keep-Alive: timeout=5
204 No Content
No body returned for response
PATCH /tasks/:id/complete
curl --request PATCH \
--url http://localhost:3333/tasks/02729739-8b1a-4cb7-8365-2a52c1dfc024/complete
Content-type: application/json
Date: Mon, 29 May 2023 10:57:54 GMT
Connection: keep-alive
Keep-Alive: timeout=5
204 No Content
No body returned for response
DELETE /tasks/:id
curl --request DELETE \
--url http://localhost:3333/tasks/02729739-8b1a-4cb7-8365-2a52c1dfc024
Content-type: application/json
Date: Mon, 29 May 2023 10:59:40 GMT
Connection: keep-alive
Keep-Alive: timeout=5
204 No Content
No body returned for response