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
events.js:66
throw arguments[1]; // Unhandled 'error' event
^
Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED
at RedisClient.on_error (C:\login\node_modules\redis\index.js:140:24)
at Socket. (C:\login\node_modules\redis\index.js:74:14)
at Socket.EventEmitter.emit (events.js:88:17)
at Socket._destroy.self.errorEmitted (net.js:327:14)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
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 events.js:66 throw arguments[1]; // Unhandled 'error' event ^ Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED at RedisClient.on_error (C:\login\node_modules\redis\index.js:140:24) at Socket. (C:\login\node_modules\redis\index.js:74:14)
at Socket.EventEmitter.emit (events.js:88:17)
at Socket._destroy.self.errorEmitted (net.js:327:14)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
Please help me resolve this problem