Skip to content

alosaur/mustache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mustache template render

mustache.js

test

How to use renderer in Alosaur

import { renderFile } from 'https://deno.land/x/mustache/mod.ts';

app.useViewRender({
    type: 'mustache',
    basePath: `${Deno.cwd()}/views/`, // path to folder views
    getBody: (path: string, model: Object, config: ViewRenderConfig) =>
        renderFile(normalize(`${config.basePath}${path}.html`), model),
});