A view is rendered using the method viewResult. The viewResult accepts two parameters -

  1. view identification - view location or view name or id
  2. model

Let's see an example -

export class DefaultController extends Controller {

    async default() {
        const model = {
            title: 'FortJs'
        const result = await viewResult('default/index.html',model);
        return result;

By default fortjs provides mustache as view engine. But any view engine like - handlebar, ejs etc can be used.

For configuring other view engine, please read the docs - viewEngine