Skip to content

Instantly share code, notes, and snippets.

@blakmatrix
Last active December 10, 2015 02:48
Show Gist options
  • Save blakmatrix/4370713 to your computer and use it in GitHub Desktop.
Save blakmatrix/4370713 to your computer and use it in GitHub Desktop.
var redis = require('redis');
var client = redis.createClient(6479, 'nodejitsudb625902.redis.irstack.com');
client.auth('nodejitsudb625902.redis.irstack.com:f327cfe980c9b8e975fbebb4', function (err) {
if (err) { throw err; }
// You are now connected to your redis.
});
//client An existing redis client object you normally get from redis.createClient()
app.use(
express.session({
store: new RedisStore({
client: client
}),
secret: appConfig.cookie_secret
})
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment