koa2-nunjucks
v1.1.1
Published
koa2 middleware for nunjucks
Downloads
2
Readme
Koa2 middleware of nunjucks.
Install
$ npm install --save koa@next
$ npm install --save koa2-nunjucks
Usage
const Koa = require('koa')
const app = new Koa()
const nj = require('../lib')
app.use(nj({
debug: true, // default: false
ext: 'html', // default: 'html'
path: '../tmpl', // default: './'
njConfig: {
watch: true
/* Config Options */
}
}))
Examples
$ git clone https://github.com/cjg125/koa2-nunjucks.git demo
$ cd demo
$ npm install
$ node --harmony example/
# http://127.0.0.1:3000/