Updated Express.js from version 2 to 3, and the following call to app.dynamicHelpers({..}) broke as it is no longer present in V3:
app.dynamicHelpers({
request: function(req){
return req
},
...etc.
});
There’s a migration guide which says this:
app.dynamicHelpers()(use middleware + res.locals)
But I’m stumped how to do that. Is there a more concrete example of how to migrate that?
Related SO post: nodejs express 3.0
I had the same problem with session.user and just fixed it by understanding that the app.use function needs to be IN the configure part, not where it was before.
Before:
After:
for Flash have a look at connect-flash