express-session-sequelize
Express session store using Sequelize to persist session data.
Usage
The session store must first be initialized by passing in expressSession.Store
const expressSession = ;const SessionStore = expressSessionStore;
Then the session store instance can be created by using new SessionStore(options)
const express = ;const cookieParser = ;const expressSession = ;const SessionStore = expressSessionStore; const Sequelize = ;const myDatabase = 'database' 'username' 'password' host: 'localhost' dialect: 'mysql'; const sequelizeSessionStore = db: myDatabase; const app = ; app;app;
Options
Full list of options that can be passed in while instanciating the session store.
const options = db // Valid Sequelize instance **required checkExpirationInterval // How often expired sessions are purged in milliseconds. (Default: 15 minutes) expiration // How long until inactive sessions expire in milliseconds. (Default: 24 hours);