Fix(lint): Add import eslint and fix import errors

This commit is contained in:
Berkeley Martinez
2016-06-23 20:05:30 -07:00
parent cc0543d5df
commit 668bd74690
27 changed files with 103 additions and 144 deletions

View File

@@ -1,8 +1,9 @@
import session from 'express-session';
import MongoStoreFactory from 'connect-mongo';
import secrets from '../../config/secrets';
const MongoStore = MongoStoreFactory(session);
const sessionSecret = process.env.SESSION_SECRET;
const url = process.env.MONGODB || process.env.MONGOHQ_URL;
export default function sessionsMiddleware() {
return session({
@@ -10,7 +11,7 @@ export default function sessionsMiddleware() {
cookie: { maxAge: 900 * 24 * 60 * 60 * 1000 },
resave: true,
saveUninitialized: true,
secret: secrets.sessionSecret,
store: new MongoStore({ url: secrets.db })
secret: sessionSecret,
store: new MongoStore({ url })
});
}