Skip to content

Instantly share code, notes, and snippets.

@BoyCook
Created November 18, 2012 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BoyCook/4107969 to your computer and use it in GitHub Desktop.
Save BoyCook/4107969 to your computer and use it in GitHub Desktop.
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