5
nowjs 및 node_redis를 사용하고 있습니다. 나는 아주 간단한 것을 만들려고 노력하고있다. 그러나 지금까지는 console.log() 만 수행하기 때문에이 튜토리얼은 공백으로 남겨 두었습니다. 내 클라이언트 측에서client.get()의 값이 실제 값 대신 "true"입니다.
//REDIS
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());
}
는 :
now.receiveShowRedisCard = function(card_id) {
alert("redis card: "+card_id);
}
경고는 단지 "true"를 밖으로 준다 - 나는 "사과"입니다 키 "카드"의 값을 얻기 위해 기다리고 있었다.
아이디어가 있으십니까?