How to display message using connect-flash and express-messages on .dust file on Node
问题 I'm using Nodejs and Expressjs and Kraken , I need to display message when added a product on index but I tried many time for to config but messages still not appear as I expect. Here is my config.js: var flash = require('connect-flash'); app = module.exports = express(); app.use(kraken(options)); //flash app.use(flash()); app.use(function (req, res, next) { res.locals.messages = require('express-messages')(req, res); next(); }); My controller : router.post('/somePath', function (req, res) {