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

The res.render(viewName, data, callback(error, html)) where parameters mean following:

  • viewName: a template name with filename extension or if view engine is set without the extension
  • data: an optional object that is passed as locals; for example, to use msg in Jade, we need to have {msg: "..."}
  • callback: an optional function that is called with an error and HTML when the compilation is complete