add session and cookie and passport config for server

This commit is contained in:
catarak 2016-05-13 16:04:16 -04:00
parent 091741b974
commit 2b99122f30

View file

@ -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());