add passport

This commit is contained in:
Shannon Sterz 2016-02-23 17:46:44 +01:00
parent 2057374b47
commit 7e1d8187f2

View file

@ -4,7 +4,8 @@ var favicon = require('serve-favicon');
var logger = require('morgan'); var logger = require('morgan');
var cookieParser = require('cookie-parser'); var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser'); var bodyParser = require('body-parser');
var passport = require('passport');
require('./config/passport');
var routes = require('./routes/index'); var routes = require('./routes/index');
var users = require('./routes/users'); var users = require('./routes/users');
@ -21,6 +22,7 @@ app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser()); app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public'))); app.use(express.static(path.join(__dirname, 'public')));
app.use(passport.initialize());
app.use('/', routes); app.use('/', routes);
app.use('/users', users); app.use('/users', users);