From b60df56157ee1fd0bd4938799bac05a62fda91a1 Mon Sep 17 00:00:00 2001 From: lookshe Date: Sat, 14 Mar 2015 20:45:20 +0100 Subject: initial commit from working version --- .../node_modules/redis/examples/simple.js | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 signaling-server/node_modules/socket.io/node_modules/redis/examples/simple.js (limited to 'signaling-server/node_modules/socket.io/node_modules/redis/examples/simple.js') diff --git a/signaling-server/node_modules/socket.io/node_modules/redis/examples/simple.js b/signaling-server/node_modules/socket.io/node_modules/redis/examples/simple.js new file mode 100644 index 0000000..f1f2e32 --- /dev/null +++ b/signaling-server/node_modules/socket.io/node_modules/redis/examples/simple.js @@ -0,0 +1,24 @@ +var redis = require("redis"), + client = redis.createClient(); + +client.on("error", function (err) { + console.log("error event - " + client.host + ":" + client.port + " - " + err); +}); + +client.set("string key", "string val", redis.print); +client.hset("hash key", "hashtest 1", "some value", redis.print); +client.hset(["hash key", "hashtest 2", "some other value"], redis.print); +client.hkeys("hash key", function (err, replies) { + if (err) { + return console.error("error response - " + err); + } + + console.log(replies.length + " replies:"); + replies.forEach(function (reply, i) { + console.log(" " + i + ": " + reply); + }); +}); + +client.quit(function (err, res) { + console.log("Exiting from quit command."); +}); -- cgit v1.2.3