Created
November 18, 2012 22:55
-
-
Save BoyCook/4107969 to your computer and use it in GitHub Desktop.
Node.js configuration for session with redis
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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