Package Exports
- better-sqlite3-session-store
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (better-sqlite3-session-store) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
better-sqlite3-session-store
better-sqlite3-sessions-store provides a better-sqlite3 session storage for express-session.
Usage
const sqlite = require("better-sqlite3");
const session = require("express-session")
// TODO: Finalize npm name
const SqliteStore = require("better-sqlite3-session-store")(session)
const db = new sqlite("sessions.db", { verbose: console.log });
app.use(
session({
store: new SqliteStore({
client: db,
expired: {
clear: true,
intervalMs: 900000 //ms = 15min
}
}),
secret: "keyboard cat",
resave: false,
})
)License
See License.
Inspiration
To build this library, I looked at other session stores: