Implementation of the session storage in Apache Cassandra as an extension of the express-session middleware. This version has been fully updated to ES6 and Node.js >= 6.0.0. For backwards compatibility, use older versions of the package.
$ npm install [-g] cassandra-store
null or undefined, a new Cassandra client will be created.
Client options come from the Cassandra client driver (version 3.x).
To create the table in the Cassandra database, you need the execute the following CQL commands:
USE tests;DROP TABLE IF EXISTS sessions;CREATE TABLE IF NOT EXISTS sessions (sid text,session text,expires timestamp,PRIMARY KEY(sid));
To activate debugging, set the environment variable
$ export NODE_DEBUG=cassandra-store
Usage within express:
const session = ;const CassandraStore = ;app;