Skip to content

Instantly share code, notes, and snippets.

Created Jun 12, 2020
What would you like to do?
import { App, ViewRenderConfig } from "";
import { Handlebars } from '';
import { HomeArea } from "./areas/home/HomeArea.ts";
const app = new App({
areas: [HomeArea],
// Basedir path
const viewPath = 'views';
// Create Handlebars config
const handle = new Handlebars({
baseDir: viewPath,
extname: '.hbs',
layoutsDir: 'layouts/',
partialsDir: 'partials/',
defaultLayout: 'main',
helpers: undefined,
compilerOptions: undefined,
type: 'handlebars',
basePath: viewPath,
getBody: async (path: string, model: any, config: ViewRenderConfig) => await handle.renderView(path, model),
root: 'statics',
baseRoute: '/statics/',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment