This is a backend template for Role based authentication which is created by using nodejs, epxress, jwt and mongoDB. It is perfect fit for creating a Customer management system using nodejs-backend or reactjs-frontend.
Name: Bhasin Neeraj
Email: [email protected]
File | Details(contains) |
---|---|
congif.json | mongoDB Url, JWT private key |
helpers/db.js | contains the monogoDB connection |
helpers/errorHandler.js | global errors |
helpers/jwt.js | authenticates the token and role. |
helpers/role.js | contains the roles(Admin, User) |
services/user.services.js | all methods that perform crud operation |
routes/user.controllers.js | routes to all crud operations |
1. clone the repo
2. install npm packages-> npm install
3. run the app.js-> node app.js
4. use the postman to test the app