Skip to content

Commit

Permalink
Update README with Express 4.x middleware.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredhanson committed Aug 20, 2015
1 parent 0532f79 commit 66fb128
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,12 @@ persistent login sessions (recommended, but not required), `passport.session()`
middleware must also be used.

var app = express();
app.use(express.static(__dirname + '/../../public'));
app.use(express.cookieParser());
app.use(express.bodyParser());
app.use(express.session({ secret: 'keyboard cat' }));
app.use(require('serve-static')(__dirname + '/../../public'));
app.use(require('cookie-parser')());
app.use(require('body-parser').urlencoded({ extended: true }));
app.use(require('express-session')({ secret: 'keyboard cat', resave: true, saveUninitialized: true }));
app.use(passport.initialize());
app.use(passport.session());
app.use(app.router);

#### Authenticate Requests

Expand Down

0 comments on commit 66fb128

Please sign in to comment.