module.exports = (req, res, next) => {
  req.app.settings.nunjucksEnv
    .addGlobal('req', req)
    .addGlobal('res', res);

  next();
}

module.exports = (req, res, next) => {
  res.locals.req = req;
  res.locals.res = res;
  next();
}

Add req/res to res.locals not global nunjucks instance