Created
August 9, 2012 09:54
-
-
Save paulgrav/3302796 to your computer and use it in GitHub Desktop.
Reduced node_redis issue
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
var redis = require('redis'); | |
var client = redis.createClient(6379,’localhost'); | |
client.subscribe("football.match.event"); | |
client.on("error", function (err) { | |
console.log("error event - " + client.host + ":" + client.port + " - " + err); | |
console.log('connected: ' + client.connected); | |
}); | |
client.on("end", function (err) { | |
console.log("error event - " + client.host + ":" + client.port + " - " + err); | |
}); | |
client.on("close", function (err) { | |
console.log("error event - " + client.host + ":" + client.port + " - " + err); | |
}); | |
client.on("message", function (channel, message) { | |
console.log("XXX"); | |
console.log(JSON.parse(message)); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment