- Easy to Implement in your existing Projects
- Passport Js Local Authentication
- Express Validation for User Registration and Login
- Sessions and Cookies based Authentication
- Only admins can change the role of others but not himself without other admin's approval
- Persistent Session after server reboots using connect-mongo package
- Take the user back to exact route which he requested for before login using connect-ensure-login package
- Error Handling using Error-handler package
- Ensure MongoDB is running on your machine
- Install Dependencies:
npm install
- Run the Server:
npm start
or
npm run dev
- Open the Browser and go to http://localhost:3000/
- Register with your .env admin email to get admin access
Set the environment variables in the .env file in the root directory of the project.
PORT=3000
MONGO_URI=mongodb://localhost:27017/mydatabase
SESSION_SECRET=MySuperSecretSession
[email protected]