Skip to content
Riak backed session store for Connect, ExpressJS and the like.
JavaScript Makefile
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
.gitignore
.travis.yml
API.md
History.md
Makefile
Readme.md
index.js
package.json
test.js

Readme.md

Connect Riak Sessions

Build Status Gem Version

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.

Installation

  $ npm install connect-riak-sessions

Options

  • client An existing nodiak client object you normally get from riak.getClient()
  • bucket Riak bucket to use defaulting to expressjs_sessions
  • scheme Riak scheme ('http'|'https')
  • host Riak server hostname
  • port Riak server tcp port #
  • ... Remaining options passed to the riak getClient() method.

Usage

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'
}));

API Docs

The API Docs are generated using Dox.

License

MIT

Something went wrong with that request. Please try again.