|
|
@ -24,18 +24,24 @@ pubClient.on("connect", function() { |
|
|
|
console.log("You are now connected"); |
|
|
|
}); |
|
|
|
|
|
|
|
setInterval(function () { |
|
|
|
var resob1 = {} |
|
|
|
resob1.data = '1' |
|
|
|
resob1.user25user = 'user' |
|
|
|
|
|
|
|
var resob1string = JSON.stringify(resob1); |
|
|
|
console.log('-------------------- '+JSON.stringify(resob1string)); |
|
|
|
|
|
|
|
pubClient.hmset('ekjgpiegwerpowfmfsdfsdgsk', resob1string, function(err, res) { |
|
|
|
console.log('>>>>>>>>>eroor>>>>>>>>>>>>>>>>>>> '+JSON.stringify(err)); |
|
|
|
console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> '+JSON.stringify(res)); |
|
|
|
}); |
|
|
|
|
|
|
|
pubClient.hgetall('ekjgpiegwerpowfmfsdfsdgsk', function(err, object) { |
|
|
|
console.log('<<<<<<<<<<eroor<<<<<<<<<<<<<<<<< '+JSON.stringify(err)); |
|
|
|
console.log('<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< '+JSON.stringify(object)); |
|
|
|
}); |
|
|
|
}, 3000); |
|
|
|
|
|
|
|
http.listen(3000, () => console.error('listening on http://localhost:3000/')); |
|
|
|
console.error('socket.io example'); |
|
|
|