Create a back-end applcation in Node.js
- Node.js
- MongoDB
- Cluster
All the project was based and followed in this playlist, by Academind YouTube chanell Creating a REST API with Node.js
TO DO
- Clone the repository
- Create a MongoDB Cluster (topic below)
- Open the file nodemon.json
- Change database_password to your MongoDB database password.
- Change token_password to any word you want. This is just a salt to encrypt the password
- Run this command to start the application
$ npm startTODO Verify if it works
TO DO
TO DO Print with the requests (GET, POST, DELETE, ...)
$ npm init$ npm install --save express $ node server.js # run server$ npm install --save-dev nodemon # automatic restart server when change the code$ npm start # nodemon server.js$ npm install --save morgan # show the REST in terminal (ex: GET /orders/123 200)$ npm install --save body-parser$ npm install --save mongoose # mongodb manager$ npm install --save multer $ npm install bcrypt --save # library to encrypt password $ npm install jsonwebtoken --save # library for user token in login $ npm -v # 3.5.2 $ node -v # v8.10.0