Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Express 3.0 flash messages with view helper
app.use(require('connect-flash')());
// Expose the flash function to the view layer
app.use(function(req, res, next) {
res.locals.flash = function() { return req.flash() };
next();
})
@tj
tj commented

or res.locals.flash = req.flash.bind(req)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.