Skip to content

NeDB-backed session store for the Connect/Express session middleware

Notifications You must be signed in to change notification settings

mishschmid/connect-nedb-session

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

connect-nedb-session

IMPORTANT: this library is not maintained anymore, please don't submit anymore pull requests except for bugfixes

NeDB-backed session store for the Connect/Express session middleware.

Install and test

npm install connect-nedb-session
npm test

How to use

// If you use Connect alone
var connect = require('connect')
 , session = connect.session
 , NedbStore = require('connect-nedb-session')(session);

// If you use Express
var express = require('express')
 , session = express.session
 , NedbStore = require('connect-nedb-session')(session);

// If you use Express 4.x
var express = require('express')
 , session = require('express-session')
 , NedbStore = require('connect-nedb-session')(session);

// Use with the session middleware (replace express with connect if you use Connect)
server.use(session({ secret: 'yoursecret'
                   , key: 'yoursessionkey'
                   , cookie: { path: '/'
                             , httpOnly: true
                             , maxAge: 365 * 24 * 3600 * 1000   // One year for example
                             }
                   , store: new NedbStore({ filename: 'path_to_nedb_persistence_file' })
                   }));

License

MIT

About

NeDB-backed session store for the Connect/Express session middleware

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%