@lennym/redis-session
v2.2.0
Published
A redis-backed session store for express
Downloads
2,935
Readme
redis-session
A redis-backed session store for express
redis-session simplifies the setting up of a redis backed session store for express.
Usage
const app = express();
const session = require('@lennym/redis-session');
app.use(session({ secret: 'a better secret than this' }));Options
secret- String - Required - used to sign cookies and encrypt data in redis. Should be a high-entropy stringhost- String - hostname of your redis instance - defaultlocalhostport- Number - port of your redis instance - default6379ttl- Number - expiry time of your session in seconds - defaultnullname- String - the name of the session cookie - defaultsidpath- String - the path of the session cookie - default/secure- Boolean - if set to true will only transmit session cookies over https connections - defaultprocess.env.NODE_ENV === 'production'
