O'Reilly logo
  • Patrick S thinks this is interesting:

app.get('/render-title', function(req, res) {
  res.render('index', {title: 'Pro Express.js'});
});

The index.jade file remains the same. It prints the title value, and looks like this:

extends layout

block content
  h1= title
  p Welcome to #{title}

From

Cover of Pro Express.js

Note

response.render() using 'data' argument