mongoose-session-store

express session store implementation using Mongoose

Needs a mongo active connection

npm install mongoose-session-store

Create session store:

var MongooseSession = require("mongoose-session-store");
var MongooseSessionStore = new MongooseSession({
    interval: 120000 // expiration check worker run interval in millisec (default: 60000)
});

Configure Express

var express = require("express");
...
// configure session provider
app.use(express.session({
    store: MongooseSessionStore,
    ...
});
...

That's it.