Skip to content

Commit

Permalink
fix(templates:express:config) express deprecated issue
Browse files Browse the repository at this point in the history
  • Loading branch information
hiromitz committed Jul 14, 2014
1 parent 4ef9f57 commit 8dc2f1e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/templates/server/config/express.js
Expand Up @@ -26,7 +26,8 @@ module.exports = function(app) {
app.set('view engine', 'html');<% } %><% if (filters.jade) { %>
app.set('view engine', 'jade');<% } %>
app.use(compression());
app.use(bodyParser());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
app.use(methodOverride());
app.use(cookieParser());
<% if (filters.auth) { %>app.use(passport.initialize());<% } %><% if (filters.twitterAuth) { %>
Expand All @@ -35,6 +36,8 @@ module.exports = function(app) {
// We need to enable sessions for passport twitter because its an oauth 1.0 strategy
app.use(session({
secret: config.secrets.session,
resave: true,
saveUninitialized: true,
store: new mongoStore({
url: config.mongo.uri,
collection: 'sessions'
Expand Down

0 comments on commit 8dc2f1e

Please sign in to comment.