0.0.5 • Published 8 years ago

connect-aerospike-2 v0.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

Connect Aerospike

connect-aerospike is an Aerospike session store backed by aerospike-client-nodejs.

Installation

$ npm install connect-aerospike2

connect-aerospike was already taken. I didn't check before writing this one. They're pretty much the same except the current connect-aerospike (as of this commit) has some console.log statements in it and no docs on namespace and set settings (although it supports it)

A note for Express 3.x users

Use express-session instead of the default connect session middleware.

$ npm install express-session

Options

An Aerospike client is required. An existing client can be passed directly using the client param or make a new one with hosts or host/port.

  • client A configured, but not connected, aerospike client
  • hosts A list of Aerospike server {addr:'127.0.0.1',port:3000}
  • host A single Aerospike host (def: 127.0.0.1)
  • port A single Aerospike port for the host (def: 3000)

The following additional params may be included:

  • ttl Aerospike session TTL (expiration) in seconds (def: 86400)
  • ns Namespace to use (def: store_session)
  • set Set to use (def: session)
  • prefix Key prefix defaulting to "sess:"

Usage

Pass the express-session store into connect-aerospike to create a AerospikeStore constructor.

var session = require('express-session');
var RedisStore = require('connect-aerospike2')(session);

app.use(session({
    store: new AerospikeStore(options),
    secret: 'keyboard cat'
}));

License

MIT

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago