diff --git a/app.js b/app.js index 1bedc9013c..f48d53c41d 100755 --- a/app.js +++ b/app.js @@ -64,6 +64,10 @@ app.use(function(req, res, next) { next(); }); app.use(flash()); +app.use(function(req, res, next) { + res.locals.flash = req.flash.bind(req); + next(); +}); app.use(less({ src: __dirname + '/public', compress: true })); app.use(app.router); app.use(express.static( path.join(__dirname, 'public'), { maxAge: 864000000 } ));