title: req.flash() node express 4
body: <p>I like use req.flash(), but didnt work. I tried different ways. Result was nothing. #{message} is empty. I dont know why... thanks to the help!</p>
  
  <p>server.js:</p>
  
  <pre><code>var express = require('express');
  var flash = require('connect-flash');
  var bodyParser = require('body-parser');
  var cookieParser = require('cookie-parser');
  var session = require('express-session')
  
  var app = express();
  
  app.use(cookieParser('secret'));
  app.use(session({cookie: { maxAge: 60000 }}));
  app.use(flash());
  </code></pre>
  
  <p>controller:</p>
  
  <pre><code>app.get('/feedback', function (req, res) {
      res.render('feedback', { message: req.flash('info')
      });
  });
  
  app.post('/fb', function(req, res) {
      req.flash('info', 'hello world');
      res.redirect('/feedback');
  });
  </code></pre>
  
  <p>view.jade:</p>
  
  <pre><code>           p #{message}
  </code></pre>