A Cassandra session store for connect.
This project was forked from B2MSolutions connect-cassandra.
Handle session wit cassandra using Datastax nodejs-driver.
Updated for using with express new version.
npm install connect-cassandra
var express = require('express'),
cassandra = require('cassandra-driver'),
session = require('express-session'),
cassandraStore = require('connect-cassandra')(session);
var client = new cassandra.Client({contactPoints: ['myhost'], keyspace: 'mykeyspace'});
client.connect(function(err, result) {
if(err == null) {
console.log('Connected.');
app.use(session({
secret: 'supersecretkeygoeshere',
store: new cassandraStore({ pool: client })
}));
} else {
console.log('Not Connected');
}
});
Pair programmed by Roy Lines and James Bloomer.
Contributions from David Wetterau.
Adapted by Octavio Fernandes.