Skip to content

Instantly share code, notes, and snippets.

@0xBADC0FFEE
Created September 5, 2013 10:48
Show Gist options
  • Save 0xBADC0FFEE/6448629 to your computer and use it in GitHub Desktop.
Save 0xBADC0FFEE/6448629 to your computer and use it in GitHub Desktop.
app.use(express.session({
secret:'secret',
maxAge: new Date(Date.now() + 3600000),
store: new MongoStore(
{db:mongoose.connection.db},
function(err){
console.log(err || 'connect-mongodb setup ok');
})
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment