Skip to content

randysecrist/connect-riak-sessions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Riak backed session store for Connect, ExpressJS and the like.

Resources

Stars

Watchers

Forks

Packages

No packages published