Я установил Redis по следующим ссылкам.https://github.com/mranney/node_redis
и попытка
var redis = require("redis"),
client = redis.createClient();
client.on("error", function (err) {
console.log("Error " + 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) {
console.log(replies.length + " replies:");
replies.forEach(function (reply, i) {
console.log(" " + i + ": " + reply);
});
client.quit();
});
и запуск node test.js
дает мне эту ошибку, почему?
Error Error: Redis connection to 127.0.0.1:6379 failed - ECONNREFUSED, Connection refused
почему появляется эта ошибка?и что я должен делать ?