connect-riak-sessions is a Riak session store implemented as middleware for connect & expressjs backed by nodiak. Any version of Riak will work.
For extra bang for your buck; see automatic key expiration using bitcask.
connect-riak-sessions >= 0.0.1
developed on connect 2.9.2
.
$ npm install connect-riak-sessions
client
An existing nodiak client object you normally get fromriak.getClient()
bucket
Riak bucket to use defaulting toexpressjs_sessions
scheme
Riak scheme ('http'|'https')host
Riak server hostnameport
Riak server tcp port #- ... Remaining options passed to the riak
getClient()
method.
To use with Connect or a Test Framework:
var connect = require('express-session'),
RiakStore = require('connect-riak-sessions')(connect);
connect().use(connect.session({
secret: 'keyboard cat',
store: new RiakStore(options)
}));
To use with ExpressJS:
var RiakStore = require('connect-riak-sessions')(express);
// Configure Middleware
app.use(express.session({
store: new RiakSessionStore({
bucket: 'app_session_bucket',
scheme: 'http',
host: 'localhost',
port: 8098,
}),
secret: 'keyboard cat'
}));
The API Docs are generated using Dox.
MIT