Views
Last updated
Last updated
We briefly introduced you to views when we discussed in the router definition. Views are well-defined, reusable representation of a response to a request. Views can be static—meaning there are no variable definitions in the view, or dynamic—meaning there are variable portions in the view.
Blueprint does not have its own, proprietary view type. Instead, Blueprint support any view type (i.e., template engine) supported by . You just have to
Install the node module for the template engine you plan to use for your view type; and
The extension of the view must match the name of its corresponding template engine.
For example, if you want to use as the template engine for your views, then your views must have the file extension in .pug
. Likewise, if you want to use , then your views must have the file extension .handlebars
.