Tag Archives: views in Node.js

01 Project – Node.js / Express / MongoDB – Part 11 – Rendering the views

None of these views we have created so far will do anything unless we make a few modifications to our controllers to get our views to render properly.

Open /controllers/home.js and update the contents to look identical to the code shown below:

module.exports = {
  index: function(req, res) {
    res.render('index');
  }
};

Continue reading