2.0.1 • Published 8 years ago

session-rethinkdb v2.0.1

Weekly downloads
99
License
ISC
Repository
github
Last release
8 years ago

session-rethinkdb

NPM Version NPM Downloads Node.js Version Build Status Dependency Status Coverage Status

NPM

downloads-url

RethinkDB session store for Express and Connect.

Installation

npm install session-rethinkdb

Usage

const r = require('rethinkdbdash')();
const session = require('express-session');
const RDBStore = require('session-rethinkdb')(session);

const store = new SessionStore(r, {
  browserSessionsMaxAge: 60000, // optional, default is 60000. After how much time should an expired session be cleared from the database
  clearInterval: 60000, // optional, default is 60000. How often do you want to check and clear expired sessions
});

app.use(session({
    // https://github.com/expressjs/session#options
    secret: 'keyboard cat',
		// Pass the store to express-session
    store: store,
		// This needs to be set for session-rethinkdb to work!
    resave: true,
    saveUninitialized: true
}));

Note: The API has changed in v2.0.

Refer to the example application for a full example.

2.0.1

8 years ago

2.0.0

9 years ago

1.0.10

9 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago