var __project = exports.__project = path.join(__dirname, '../')
, __app = exports.__app = path.join(__project, app)
, __configs = exports.__configs = path.join(__project, 'config')
, __helpers = exports.__helpers = path.join(__app, 'helpers')
app.set('foo', 'bar');
app.use(function (req, res, next) {
res.locals.foo = 'BAR'
});
app.get('/', function (req, res, next) {
console.log(req.app.get('foo')); // bar
console.log(res.app.get('foo')); // bar
// res.locals передаются во view engine вместе c app.locals
console.log(res.locals.foo); // BAR
});