This is Micro Project where CRUD operations are executed on Ventilators' status in Hospitals
- Installation of Node.js and MongoDB
- Importing the Express server
- Executing using Postman API
- server.js
- validates the user's login credentials
- If these credentials are correct, then the user can access index.js
- middleware.js
- authenticates user while accessing the site.
- index.js
- It is the body of the rest api
- config.js
- It has a secret key
- Run the index.js in that folder destination in cmd where you have cloned these files using
node index.js
- Open the postman
- In server.js, I kept default username and password. Give those credentials to the body part of postman
- Copy the JWT token given by the server
- JWT token is provided only when you give the correct login credentials
- While you visit any page, make sure that you had added the JWT token for Authorization in the headers part. Add the token in this form "Bearer JWTtoken"
- Then start executing the CRUD operations