1.1.1 • Published 7 years ago

koa2-nunjucks v1.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

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/

Config Options

nunjucks