Package Exports
- connect-loki
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 (connect-loki) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
connect-loki
A Loki.js session store for Connect/Express
Setup
npm install connect-loki express-sessionPass the express-session store into connect-loki to create a LokiStore constructor.
var session = require('express-session');
var LokiStore = require('connect-loki')(session);
var options = {}; // See available options below
app.use(session({
store: new LokiStore(options),
secret: 'keyboard cat'
}));Options
Setting the path to the database file is optional but recommended.
Available parameters:
-
pathPath to the database file. Defaults to./session-store.db -
autosaveSetfalseto disable save to disk. Defaults totrue ttlDuration in seconds to keep stale sessions. Set to0to disable TTL. Defaults to1209600(14 days)-
logErrorsWhether or not to log client errors. Defaults tofalse- If
true, a default logging function (console.error) is provided. - If a function, it is called anytime an error occurs (useful for custom logging)
- If
false, no logging occurs.
- If
License
MIT