LearnBoost / cluster

Node.JS multi-core server manager with plugins support.
http://learnboost.github.com/cluster
MIT License
2.29k stars 159 forks source link

node.js :: expressjs with Redis for session #182

Closed sridhar480 closed 12 years ago

sridhar480 commented 12 years ago

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

tj commented 12 years ago

I thinkkkk you have the wrong repo, but you have to fire up redis... $ redis-server