express-session-id
An express middleware for session ID. Mainly Used for analytics session tracking.
Install
$ npm install --save express-session-id
Usage
;;; const app = ;app;app app;
API
Table of Contents
sessionId
This function return a session id middleware. The session id is placed at req.sessionID
Parameters
options
object (optional, default{}
)options.idleTime
number max idle time before destoying a session. env: SESSION_ID_IDLE_TIME (optional, default(30*1000*60)
)options.name
string Name of the cookie. env: SESSION_ID_NAME (optional, defaults_id
)options.genId
function function to generate id's. see uuid/v4 (optional, defaultuuid/v4
)options.cookie
object config to pass to cookies. see cookie (optional, default{}
)
License
MIT © Daniel Reisel