express-mongoose-store
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -12,2 +12,3 @@ 'use strict'; | ||
options.ttl = options.ttl || one_day; | ||
this.ttl = options.ttl; | ||
@@ -14,0 +15,0 @@ session.Store.call(this, options); |
{ | ||
"name": "express-mongoose-store", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Session store for people who want to use MongoDB sessions, and already have a MongooseJS connection for their backend.", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -28,2 +28,11 @@ ##Express Mongoose Store | ||
###Custom Model Name | ||
By default the model name used for storing sessions is "sessions", however, you can customize this by | ||
passing a modelName argument to the store like so: | ||
```` | ||
app.use(session({ secret: 'keyboard cat', store: new MS({modelName: 'myApp_sessions' ttl: 600000}) }); | ||
```` | ||
Or if you want the session store to keep your Mongoose connection alive as well you can do the following: | ||
@@ -56,2 +65,3 @@ | ||
```` | ||
npm install | ||
npm test | ||
@@ -62,4 +72,6 @@ ```` | ||
#####v1.0.4 - Bug fix | ||
#####v1.0.3 - Session expiration with MongoDB expires via @rubenstolk | ||
#####v1.0.2 - Configurable Model Name for Session via @rubenstolk |
9159
189
74