lark-views
This repository began as a GitHub fork of queckezz/koa-views.
Template rendering middleware for koa, supporting many template engines.
Installation
$ npm install lark-views
Example
Use lark-views as a Class.
const Views = ; const views = path: 'views' map: tpl: 'ejs' ; views ;
API
views([opts])
opts
: see belowopts.map
: map from extname to template engine name.opts.path
: directory path relative from main module file if it is not an absolute path.opts.engine
: template engine, must have a methodrender(template, data)
which returns final result.