add passport
This commit is contained in:
parent
2057374b47
commit
7e1d8187f2
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Reference in a new issue