koa2-nunjucks

1.1.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i koa2-nunjucks

Weekly Downloads

2

Version

1.1.1

License

MIT

Last publish

Collaborators

  • cjg