dimanche 5 avril 2015

How to do authentication with redis in node.js?

I'm using the node_redis module and I'm not being able to determine a password for redis succesfully.


Here's my code:



var redis = require("redis"),
client = redis.createClient(6379, "localhost");

client.auth("password", function (err) { if (err) throw err; });


Whenever I run this file in the command line I get the following message: "Redis does not require a password, but a password was supplied."


I keep getting the same error, even though I tried to change the redis.conf file that is in my computer's redis instalation:



requirepass password


Please, shed some light on the issue.


Aucun commentaire:

Enregistrer un commentaire