nunjucks-component-extension for express or connect
npm install nunjucks-component-extension-middleware --save
- viewPath: view path, this is required.
- config: nunjucks config, default watch is true, this is not required.
var path = require('path');
var express = require('express');
var app = express();
app.use(require('nunjucks-component-extension-middleware')(path.join(__dirname, 'views'), {
noCache: true
}));
then, you can use nunjucks and nunjucks-component-extension !