Best way to display an error Express, Jade and Mongo Best way to display an error Express, Jade and Mongo mongoose mongoose

Best way to display an error Express, Jade and Mongo


Express 3.0:

You can use req.session to store the error message or check out this middleware for simple:https://github.com/jaredhanson/connect-flash

Express 2.0:

You can use req.flash directly. The usage described in http://expressjs.com/2x/guide.html