Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED


Question

I working with node.js by expressjs
I try to store an account to session. So, i try to test to use session with code in expressjs

var RedisStore = require('connect-redis')(express);
app.use(express.bodyParser());
app.use(express.cookieParser());
app.use(express.session({ secret: "keyboard cat", store: new RedisStore }));

but I got error Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED.
Please help me resolve this problem

1
113
12/2/2016 6:47:50 PM

After you install redis, type from terminal:

redis-server

and you'll have redis running

203
6/21/2012 11:16:53 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon