Bug:Fix file validation issue
[vnfsdk/refrepo.git] / vnfmarket / src / main / webapp / vnfmarket / node_modules / redis / examples / simple.js
1 var redis = require("redis"),
2     client = redis.createClient();
3
4 client.on("error", function (err) {
5     console.log("error event - " + client.host + ":" + client.port + " - " + err);
6 });
7
8 client.set("string key", "string val", redis.print);
9 client.hset("hash key", "hashtest 1", "some value", redis.print);
10 client.hset(["hash key", "hashtest 2", "some other value"], redis.print);
11 client.hkeys("hash key", function (err, replies) {
12     if (err) {
13         return console.error("error response - " + err);
14     }
15
16     console.log(replies.length + " replies:");
17     replies.forEach(function (reply, i) {
18         console.log("    " + i + ": " + reply);
19     });
20 });
21
22 client.quit(function (err, res) {
23     console.log("Exiting from quit command.");
24 });