express-session-sqlite
A session store for express-session
using SQLite.
Fully unit tested. PRs welcomed.
Install
$ npm i express-session-sqlite sqlite3 --save
Usage
import * as sqlite3 from 'sqlite3'
import * as express from 'express'
import * as session from 'express-session'
import sqliteStoreFactory from 'express-session-sqlite'
const SqliteStore = sqliteStoreFactory(session)
const app = express()
app.use(session({
store: new SqliteStore({
driver: sqlite3.Database,
path: '/tmp/sqlite.db',
ttl: 1234,
prefix: 'sess:',
cleanupInterval: 300000
}),
}))
Debugging
This module uses debug
under the name express-session-sqlite
. When starting up your app, do the following:
$ DEBUG=express-session-sqlite node app.js
2.0.6 - Sun Jul 19 2020 23:20:37
Contributor: dependabot[bot]
- Bump lodash from 4.17.15 to 4.17.19 (#1)
Bumps lodash from 4.17.15 to 4.17.19.
Signed-off-by: dependabot[bot] support@github.com
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>