Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leandro-parice/rocketseat-ignite-node-desafio-1
Repositório criado para o desenvolvimento e entrega do desafio da trilha Ignite NodeJS da 💜Rocketseat
https://github.com/leandro-parice/rocketseat-ignite-node-desafio-1
api api-rest desafio javascript js json node node-js nodejs rocketseat rocketseat-ignite
Last synced: 25 days ago
JSON representation
Repositório criado para o desenvolvimento e entrega do desafio da trilha Ignite NodeJS da 💜Rocketseat
- Host: GitHub
- URL: https://github.com/leandro-parice/rocketseat-ignite-node-desafio-1
- Owner: leandro-parice
- Created: 2023-05-28T17:51:04.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-29T11:25:56.000Z (over 1 year ago)
- Last Synced: 2024-11-17T09:36:49.601Z (3 months ago)
- Topics: api, api-rest, desafio, javascript, js, json, node, node-js, nodejs, rocketseat, rocketseat-ignite
- Language: JavaScript
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ignite - NodeJS
#### Rocketseat Desafio-1
Repositório criado para o desenvolvimento e entrega do desafio da trilha Ignite NodeJS da 💜[Rocketseat](https://www.rocketseat.com.br/)
### Tecnologias / Linguagens de programação
- Javascript
- NodeJS
- [CSV Parse](https://csv.js.org/)
- GitHub## Sobre o desafio
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### Instalação
npm install
### Rodar o servidor
npm run dev
### Importar CSV
npm run import# REST API
A API REST para o aplicativo de exemplo é descrita abaixo.
## Listagem de tarefas
### Request
`GET /tasks/`
curl --request GET \
--url http://localhost:3333/tasks \
--header 'Content-type: application/json'### Response
Content-type: application/json
Date: Mon, 29 May 2023 10:49:03 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Content-Length: 2200 Ok
[]## Criação de tarefa
### Request
`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"
}'### Response
Content-type: application/json
Date: Mon, 29 May 2023 10:50:14 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Transfer-Encoding: chunked201 Created
No body returned for response## Edição de tarefa
### Request
`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"
}'### Response
Content-type: application/json
Date: Mon, 29 May 2023 10:56:38 GMT
Connection: keep-alive
Keep-Alive: timeout=5204 No Content
No body returned for response## Marcar tarefa como finalizada
### Request
`PATCH /tasks/:id/complete`
curl --request PATCH \
--url http://localhost:3333/tasks/02729739-8b1a-4cb7-8365-2a52c1dfc024/complete### Response
Content-type: application/json
Date: Mon, 29 May 2023 10:57:54 GMT
Connection: keep-alive
Keep-Alive: timeout=5204 No Content
No body returned for response## Exclusão de tarefa
### Request
`DELETE /tasks/:id`
curl --request DELETE \
--url http://localhost:3333/tasks/02729739-8b1a-4cb7-8365-2a52c1dfc024### Response
Content-type: application/json
Date: Mon, 29 May 2023 10:59:40 GMT
Connection: keep-alive
Keep-Alive: timeout=5204 No Content
No body returned for response