Skip to content

Instantly share code, notes, and snippets.

@webjay
Created April 6, 2013 09:40
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 webjay/5325563 to your computer and use it in GitHub Desktop.
Save webjay/5325563 to your computer and use it in GitHub Desktop.
Redis client
var redis = require('redis');
module.exports = function () {
client = redis.createClient(process.env.REDIS_PORT, process.env.REDIS_HOST);
if (process.env.REDIS_AUTH) {
client.auth(process.env.REDIS_AUTH);
}
client.on('error', function (err) {
console.error('Redis error', err);
});
return client;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment