如何在快速渲染中使用猫鼬数据

How to use mongoose data in express render

我正在使用 Hackathon-starter,我想在 express.js

中的渲染标题 属性 中使用数据库中的用户名

我要修改的文件是here

已解决:req.user.name

exports.getAccount = function(req, res) {
  res.render('account/profile', {
    title: req.user.name
  });
};