Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (22 sloc) 808 Bytes

session-mongoose module is an implementation of connect session store using Mongoose.

Implementation Note:

Uses mongeese module to isolate session database from app's default Mongoose database.


npm install session-mongoose


Create session store:

var SessionMongoose = require("session-mongoose");
var mongooseSessionStore = new SessionMongoose({
    url: "mongodb://localhost/session",
    interval: 120000 // expiration check worker run interval in millisec (default: 60000)

Configure Express

var express = require("express");
// configure session provider
    store: mongooseSessionStore,

That's it.

Jump to Line
Something went wrong with that request. Please try again.