Demonstration of Passport authentication middleware with Express and how it can be used to create a simple cookie based login
Using https://expressjs.com/en/starter/generator.html
- npm install express-generator -g
- express
- npm install --save
- npm install passport --save
- npm install passport-local --save
- npm install express-session --save
Node, npm
- npm install
- npm start
- point your browser at http://localhost:3000
Usage: Private page will be blocked until the user logs in. Log in using "admin", "password".