add session and cookie and passport config for server
This commit is contained in:
parent
22964f7a1c
commit
62ef5556bd
1 changed files with 7 additions and 0 deletions
|
@ -25,6 +25,13 @@ import users from './routes/user.routes';
|
|||
|
||||
//Body parser, cookie parser, sessions, serve public assets
|
||||
|
||||
//Body parser, cookie parser, sessions, serve public assets
|
||||
app.use(bodyParser.urlencoded({extended: true}));
|
||||
app.use(bodyParser.json());
|
||||
app.use(cookieParser());
|
||||
app.use(session({secret: 'steve brule'}));
|
||||
app.use(passport.initialize());
|
||||
app.use(passport.session());
|
||||
app.use(Express.static(path.resolve(__dirname, '../static')));
|
||||
app.use(bodyParser.urlencoded({extended: true}));
|
||||
app.use(bodyParser.json());
|
||||
|
|
Loading…
Reference in a new issue