Saturday, 10 June 2017

NodeJs Redis-Session can't connect using password

I'm using https://github.com/smrchy/redis-sessions for my NodeJs application. This Redis-Sessions module working fine with default redis configuration.

Then I have my redis "requirepass" active in my /etc/redis/redis.conf

now redis-sessions can't connect to redis server

Here is my example code:

  var RedisSessions = require("redis-sessions");

  var port = 6379,
  host = 'MY-HOST-IP',
  mypass = 'MY-PASSWORD';

  var rs = new RedisSessions(port, host,{password:mypass});

and I tried so many ways but still can not connect. :(

Can someone guide me how to connect Redis-Sessions module using password?

Thank you



via MonkimoE

No comments:

Post a Comment