Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Node.js configuration for session with redis
var RedisStore = require('connect-redis')(express);
app.use(express.cookieParser('appsecret'));
app.use(express.bodyParser());
app.use(express.session({ secret:'appsecret', store:new RedisStore, cookie:{ maxAge:60000, expires: false } }));
app.use(express.cookieSession());
app.use(app.router);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment