0.0.5 • Published 9 years ago
connect-aerospike-2 v0.0.5
Connect Aerospike
connect-aerospike is an Aerospike session store backed by aerospike-client-nodejs.
Installation
$ npm install connect-aerospike2connect-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-sessionOptions
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.
clientA configured, but not connected, aerospike clienthostsA list of Aerospike server {addr:'127.0.0.1',port:3000}hostA single Aerospike host (def: 127.0.0.1)portA single Aerospike port for the host (def: 3000)
The following additional params may be included:
ttlAerospike session TTL (expiration) in seconds (def: 86400)nsNamespace to use (def: store_session)setSet to use (def: session)prefixKey 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