An open API service indexing awesome lists of open source software.

https://github.com/jonatandb/nodejs-rest-api-jwt-mongo-fazt

Nodejs Express REST API con JWT y Roles (Autorización y Autenticación) & Mongodb
https://github.com/jonatandb/nodejs-rest-api-jwt-mongo-fazt

api-rest babel bcryptjs dotenv express helmet jonatandb jwt mongoose morgan-middleware nodejs nodemon rest-api

Last synced: 3 months ago
JSON representation

Nodejs Express REST API con JWT y Roles (Autorización y Autenticación) & Mongodb

Awesome Lists containing this project

README

          

## [Nodejs REST API con JWT y Roles (Autorización y Autenticación) & Mongodb](https://www.youtube.com/watch?v=lV7mxivGX_I&t=61s&ab_channel=FaztCode)

Este es un ejemplo práctico de Nodejs y MongoDB en el que se crea una REST API que hace un CRUD de productos, permite autenticar a usuarios y establecer roles para la autorizacion de rutas en el servidor.

Adicionalmente se usará babel para utilizar las últimas características de Javascript en Nodejs.

Código de ejemplo:
https://github.com/FaztWeb/company-products-api

---

Tecnologías utilizadas:

- [NodeJs](https://nodejs.org/es/) - a JavaScript runtime built on Chrome's V8 JavaScript engine.
- [Express](https://expressjs.com/es/) - Fast, unopinionated, minimalist web framework for Node.js
- [MongoDb](https://www.mongodb.com/es) - a document database designed for ease of development and scaling.
- [JWT (JSON Web Token)](https://jwt.io/) - JWT are an open, industry standard RFC 7519 method for representing claims securely between two parties.
- [Bcryptjs](https://www.npmjs.com/package/bcryptjs) - Optimized bcrypt in JavaScript with zero dependencies. Compatible to the C++ bcrypt binding on node.js and also working in the browser.
- [Cors](https://www.npmjs.com/package/cors) - CORS is a node.js package for providing a Connect/Express middleware that can be used to enable CORS with various options.
- [DotEnv](https://www.npmjs.com/package/dotenv) - Dotenv is a zero-dependency module that loads environment variables from a .env file into process.env. Storing configuration in the environment separate from code is based on The Twelve-Factor App methodology.
- [Mongoose](https://mongoosejs.com/) - elegant mongodb object modeling for node.js
- [Morgan](https://www.npmjs.com/package/morgan) - HTTP request logger middleware for node.js
- [Helmet](https://www.npmjs.com/package/helmet) - Helmet helps you secure your Express apps by setting various HTTP headers. It's not a silver bullet, but it can help!
- [Babeljs](https://babeljs.io/) - a JavaScript compiler that allow to use next generation JavaScript, today.
- [Nodemon](https://www.npmjs.com/package/nodemon) - a tool that helps develop node.js based applications by automatically restarting the node application when file changes in the directory are detected.