-
-
Save cendrizzi/0d505d42abadb67f4cee to your computer and use it in GitHub Desktop.
socket.io redis setup code
This file contains 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
pub = irisRedis.createClient(6379,'nodejitsudb6339009772.redis.irstack.com', {auth: "auth_key"}); | |
sub = irisRedis.createClient(6379,'nodejitsudb6339009772.redis.irstack.com', {auth: "auth_key"}); | |
client = irisRedis.createClient(6379,'nodejitsudb6339009772.redis.irstack.com', {auth: "auth_key"}); | |
pub.on("error", function(err) { | |
console.error("Error connecting to redis (pub)", err); | |
}); | |
sub.on("error", function(err) { | |
console.error("Error connecting to redis (sub)", err); | |
}); | |
client.on("error", function(err) { | |
console.error("Error connecting to redis (client)", err); | |
}); | |
pub.on("connect", function () { | |
console.log('Redis Connection Successful (pub)'); | |
}); | |
sub.on("connect", function () { | |
console.log('Redis Connection Successful (sub)'); | |
}); | |
client.on("connect", function () { | |
console.log('Redis Connection Successful (client)'); | |
}); | |
io.set('store', new RedisStore({ | |
redis : irisRedis, | |
redisPub : pub, | |
redisSub : sub, | |
redisClient : client | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just got this:
Error: Auth error: undefined
[08/27 11:40:42 MDT][err] at Command.RedisClient.do_auth.self.send_anyway as callback
[08/27 11:40:42 MDT][err] at RedisClient.flush_and_error (/opt/run/snapshot/package/node_modules/iris-redis/node_modules/redis/index.js:126:25)
[08/27 11:40:42 MDT][err] at RedisClient.connection_gone (/opt/run/snapshot/package/node_modules/iris-redis/node_modules/redis/index.js:423:10)
[08/27 11:40:42 MDT][err] at Socket. (/opt/run/snapshot/package/node_modules/iris-redis/node_modules/redis/index.js:91:14)
[08/27 11:40:42 MDT][err] at Socket.EventEmitter.emit (events.js:93:17)
[08/27 11:40:42 MDT][err] at TCP.onread (net.js:418:51)
[08/27 11:40:42 MDT][err] events.js