Category: Node Js, Express and Mongoose
-

Login Model Step – 10
Step 10:-Login Model Package to run Npm i bcryptjs Npm i jsonwebtoken Config file JWT_SECRET=shairy JWT_EXPIRE=30d
-

-

Create Route – Step 8
Step 8: -Create Route Crete a new folder with name routes Create a new file inside folder route with any name like teamMember.js
-

Create Controller Step- 7
Step 7: -Create Controller Crete a new folder with name controllers Create a new file inside folder route with any name like teamMember.js For File Uploading use the following in config.env FILE_UPLOAD_PATH=./public/uploads MAX_FILE_UPLOAD=1000000 Install npm I express-fileupload Use following in server file const fileupload = require(‘express-fileupload’); app.use(fileupload()); //File upload app.use(express.static(path.join(__dirname,’public’))); //static folder const path= require(‘path’);