req.session undefined with express and connect-redis

Possible Duplicate:
‘session’ is undefined when using express / redis for session store

var express = require('express');
var app = express();
var RedisStore = require('connect-redis')(express);
var session = require('redis-session')({

  debug: true,
  ttl: 90000000,
  connection: {port: '7170', host: '127.0.0.1'}    

});

app.configure(function(){

   app.use(express.bodyParser());
   app.set('views',__dirname + '/views');
   app.set('view engine', 'ejs');
   app.use(express.static(__dirname + '/public'));
   app.use(express.session({ secret: 'p!550ff', store: new RedisStore }));
   app.use(express.cookieParser());
   app.use(app.router);

});

With this configuration, any time I call req.session, nodemon tells me that it's undefined. express.cookieParser() and express.session are well declared, I guess. Any solution...?

The cookieParser middleware needs to come before the session middleware so swap the order like this:

   app.use(express.cookieParser());
   app.use(express.session({ secret: 'p!550ff', store: new RedisStore }));

See the Connect docs on this here.