connect-redsess
Redis session middleware for Connect/Express using Redsess.
Installation
npm install connect-redsess
Usage
var connect = ;var connectRedsess = ;var app = ;app;
By default, the middleware will set the Redsess object onto req.session
.
reqsession;
Constructor Options
;
Pass an object to connect-redsess on instantiation with any of Redsess' options as well as the following addition(s):
- requestKey
String
The key at which to attach the Redsess object onto thereq
object. Defaults tosession
.
req.redsessOptions
You may also attach an object onto the req
at req.redsessOptions
with the same options as above. This is useful for any options that are set
per-request (cookies
, token
, etc.). These will override any previously set.
reqredsessOptions =cookies: reqcookies;