Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 621 Bytes

File metadata and controls

22 lines (17 loc) · 621 Bytes

Simple Passport Demo

Demonstration of Passport authentication middleware with Express and how it can be used to create a simple cookie based login

How this was made

Using https://expressjs.com/en/starter/generator.html

  1. npm install express-generator -g
  2. express
  3. npm install --save
  4. npm install passport --save
  5. npm install passport-local --save
  6. npm install express-session --save

Setup instructions

pre-reqs

Node, npm

  1. npm install
  2. npm start
  3. point your browser at http://localhost:3000

Usage: Private page will be blocked until the user logs in. Log in using "admin", "password".