November 2018
Intermediate to advanced
404 pages
10h 16m
English
After configuring your project for Stencil template engine, there are a couple of steps to take before you can use Stencil.
First, you need to import the KituraStencil module into your Application.swift file. Add this line after the import Dispatch statement:
import KituraStencil
Next, you need to tell Kitura to use the default Stencil templating engine since Kitura has three built-in templating engines you can choose from.
Add this line before you call initializeHealthRoutes(app: self):
router.setDefault(templateEngine: StencilTemplateEngine())
Read now
Unlock full access