It is an application where registered users can register their recipes so that they are available to other users. Each user can interact on the recipes, favoring or evaluating.
Route | HTTP Method | Description |
---|---|---|
/users |
POST | Create user. |
/auth |
POST | User login. |
Route | HTTP Method | Description |
---|---|---|
/users |
GET | List users. |
/users/:id |
GET | List a user. |
/users |
PUT | Update a user (No parameter required because the user is logged in). |
/categories |
GET | List categories. |
/attachments |
POST | Upload attachments (recipe or avatar). |
/recipes |
GET | List recipes. |
/recipes/:id |
GET | List a recipe. |
/recipes |
POST | Create recipe. |
/recipes:id |
PUT | Update a recipe. |
/recipes:id |
DELETE | Delete a recipe. |
/favorites/:recipe_id |
POST | Favorite a recipe. |
/favorites |
GET | List favorite recipes (of the logged in user). |
/favorites/:recipe_id |
DELETE | Remove a recipe from favorites. |
/ratings/:recipe_id |
DELETE | Evaluate a recipe (between 1 and 5). |
- Node.js
- Express
- JavaScript
- PostgreSQL
- Sequelize
- Bcryptjs
- Jsonwebtoken
- Multer
- Yup
- Dotenv
$ git clone https://github.com/Guilheeeerme/api-restful.git
Based on the ".env.example" file create your ".env" file and set up a database connection and I also created a secret token.
$ npm install
$ npm run db:migrate
$ npm run db:seed
$ npm run start