Skip to content

[Estudo] Um livro de receitas compartilhadas, onde os usuários irão cadastrar suas receitas e elas ficarão disponíveis para os demais usuários. Cada usuário pode interagir sobre a receita, favoritando e avaliando.

Notifications You must be signed in to change notification settings

Guilheeeerme/api-restful

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

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.

Routes

Route HTTP Method Description
/users POST Create user.
/auth POST User login.

Routes that the user needs to be logged in, contains Jsonwebtoken Middleware

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).

Technologies used

  • Node.js
  • Express
  • JavaScript
  • PostgreSQL
  • Sequelize
  • Bcryptjs
  • Jsonwebtoken
  • Multer
  • Yup
  • Dotenv

🔥 Installing

First Clone this repository

$ git clone https://github.com/Guilheeeerme/api-restful.git

Set as environment variables

Based on the ".env.example" file create your ".env" file and set up a database connection and I also created a secret token.

Install the dependencies

$ npm install

Run migrations and seeders

$ npm run db:migrate
$ npm run db:seed

Run Project

$ npm run start

About

[Estudo] Um livro de receitas compartilhadas, onde os usuários irão cadastrar suas receitas e elas ficarão disponíveis para os demais usuários. Cada usuário pode interagir sobre a receita, favoritando e avaliando.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published