SQLite-backed session store for Express.js using better-sqlite3. Version 0.1.6 provides a drop-in replacement for express-session stores with TypeScript support, automatic table creation, and optional WAL mode for better concurrency. Compared to other session stores, it uses synchronous better-sqlite3 API for simplicity and zero dependencies beyond better-sqlite3 and express-session. Ideal for small-to-medium Node.js apps that want session persistence without a full database server.
npm install express-sqliteNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic Express app with SQLite session store, tracking page views per session.
Ensure the path is writable or create directories manually.
Consider using an asynchronous session store (e.g., connect-redis or connect-session-knex) for high-load apps.
Keep WAL enabled unless you have a specific reason to disable it.
Explicitly set tableName to lowercase 'sessions' for cross-platform consistency.
npm install better-sqlite3
Ensure first argument is a file path (string), Buffer, or an existing better-sqlite3 Database instance.
Install express-session and import it before using SQLiteStore.