c3store

connect Sequelize session store

connect express Sequelize session store implementation

typical usage scenario with Express 3.x

# load and init express app 
express = require 'express'
app = express()
 
# load and init Sequelize connection 
Sequelize = require 'sequelize'
sequelize = new Sequelize 'db.name''db.user''db.pass'
 
# load and create session store 
C3Store = require('c3store') express.session.Store
app.use express.session
  secret: 'MyAwesomeAppSessionSecret'
  store: new C3Store sequelize

change the table name or define additional attributes

store = new C3Store db'http_session_table',
  optional:
    type: Sequelize.STRING
    allowNull: true

The Express 3.x example app shows a complete setup to get started.

build and test it

c3store git:(master) ✗ cake
Cakefile defines the following tasks:
 
cake build                # build coffee 
cake coverage             # run coverage 
cake lint                 # run lint 
cake spec                 # run specifications