https://github.com/librity/ignite_todo_middlewares
Rocket Seat - Ignite - NodeJS - Challenge 2 - A to-do list backend made with NodeJS and Express.
https://github.com/librity/ignite_todo_middlewares
challenge express ignite nodejs rest-api rocketseat todolist
Last synced: 3 months ago
JSON representation
Rocket Seat - Ignite - NodeJS - Challenge 2 - A to-do list backend made with NodeJS and Express.
- Host: GitHub
- URL: https://github.com/librity/ignite_todo_middlewares
- Owner: librity
- Created: 2021-03-14T02:51:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-25T11:57:33.000Z (over 4 years ago)
- Last Synced: 2025-01-08T07:38:46.135Z (over 1 year ago)
- Topics: challenge, express, ignite, nodejs, rest-api, rocketseat, todolist
- Language: JavaScript
- Homepage:
- Size: 85 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rocket Seat Ignite - To do Backend w/ Middlewares
## Table of Contents
- [About](#about)
- [Getting Started](#getting_started)
- [Endpoints](#endpoints)
- [Resources](#resources)
A to-do list backend made with NodeJS, Express and Jest.
### Prerequisites
- `node >= 12.0.0`
- `yarn >= 1.22.0`
### Installing
1. Clone this repo locally and install the required packages:
```bash
$ git clone https://github.com/librity/ignite_todo_middlewares.git
$ cd ignite_todo_middlewares
$ yarn install
```
2. Start a dev server:
```bash
$ yarn dev
```
3. Import the Insomnia workspace from `./insomnia/workspace.json`
and run some requests.
### Testing
Run tests with jest:
```bash
$ yarn test
```
`Users`
- `GET` http://localhost:3333/users/:id
- `POST` http://localhost:3333/users
- `PATCH` http://localhost:3333/users/:id/pro
`Todos`
- `GET` http://localhost:3333/todos
- `POST` http://localhost:3333/todos
- `PUT` http://localhost:3333/todos/:id
- `PATCH` http://localhost:3333/todos/:id/done
- `DELETE` http://localhost:3333/todos/:id
- https://rapidapi.com/blog/put-vs-patch/
- https://github.com/uuidjs/uuid#quickstart
- https://stackoverflow.com/questions/18875292/passing-variables-to-the-next-middleware-using-next-in-express-js
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array
- https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#2xx_success
- https://stackoverflow.com/questions/10865025/merge-flatten-an-array-of-arrays