NEMP (Node, Express, MongoDB, Passport) is a login system that you can easily implement on your web app. The web app was made with Node, Express, MongoDB, Passport and related technologies.
- Clone this repo
- Install all dependencies on package.json
- Install MongoDB
- Create a /data directory on nemp-login directory
- Open terminal
- cd to C:\Program Files\MongoDB\Server\4.0\bin
- Enter mongod.exe --dbpath="c:\projects\nemp-login\data"
- Open another terminal
- cd to C:\Program Files\MongoDB\Server\4.0\bin
- Enter mongo.exe
- Open terminal and cd to nemp-login directory
- Enter app.js
- Open your browser and go to localhost:3000
- Click Sign Up and create an account
- Enter the username and password you just created to login
- Now you have access to the Secret Page
Click Logout and try to access the Secret Page (localhost:3000/secret) and you are redirected to login page because you don't logged in yet.
- Go to the terminal where you have mongo.exe running.
- Enter show dbs to see if the database has been created.
- Enter use nempDB to swith to that database.
- Enter show collections
- Enter db.users.find() to see the username and password you just created.
That's all, You are set!