Classes
The following classes are available globally.
-
A
TemplateEnginefor Kitura that uses GRMustache for templating.The default file extension for templates using this engine is
mustache. If you do not explicitly provide a file extension in the call toresponse.renderthen this extension will be applied automatically.Usage Example:
router.add(templateEngine: MustacheTemplateEngine()) // An example of using a dictionary of [String: Any] parameters to be rendered router.get("/hello") { request, response, next in try response.render("MustacheExample.mustache", context: ["name": "World!"]]) next() }For more information on Mustache templating, see: https://www.kitura.io/guides/templating/mustachetemplate.html
See moreDeclaration
Swift
public class MustacheTemplateEngine: TemplateEngine
View on GitHub
Classes Reference