I am using express and jade in my nodejs application. On each route when rendering I need to access same object with config and localization object. It's working fine like this:
loadLoginPage: function(req, res) {
res.render('login', {
config: config,
i18n: res
});
}
But is there a way without rewriting {config:config,i18n:res} on each route? I tried to find how to solve this but without results.