koa-nunjucks-promise
nunjucks rendering middleware with promise for koa@next
Installation
$ npm install koa-nunjucks-promise
Example
var Koa = ;var views = ;var app = ;app
API
views([root, opts])
root (__dirname)
: __dirname + where your views are locatedopts
: these options go straight to nunjucks.- ext: extension of template file
Debug
Set the DEBUG
environment variable to koa-nunjucks-promise
when starting your server.
$ DEBUG=koa-nunjucks-promise