Created
June 25, 2014 12:44
-
-
Save artcommacode/c5309ed4a82871c4e46b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var session = require('express-session') | |
, config = require('../config') | |
, mongoStore = require('connect-mongo')({session: session}); | |
module.exports = function() { | |
return session({ | |
secret: config.sessions.secret, | |
store: new mongoStore({ | |
url: config.db.url, | |
collection : config.sessions.collection | |
}), | |
cookie: { | |
maxAge: 1000*60*60*24*30 | |
} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment