I am using nowjs and node_redis. I am trying to create something very simple. But so far the tutorial has left me empty because they are only console.log ().
var redis = require("redis"),
client = redis.createClient();
client.on("error", function (err) {
console.log("Error "+ err);
});
client.set("card", "apple");
everyone.now.signalShowRedisCard = function() {
nowjs.getGroup(this.now.room).now.receiveShowRedisCard(client.get("card").toString());
}
On my client side:
now.receiveShowRedisCard = function(card_id) {
alert("redis card: "+card_id);
}
The warning displays only "true" - I expected to get the value of the key "card", which is an "apple".
Any ideas?
source
share