freemarker-middleware
v0.2.1
Published
express middleware of freemarker
Downloads
5
Readme
freemarker-middleware
Express middleware to render FreeMarker template file(*.ftl).
install
use NPM:
npm install freemarker-middleware
usage
with express, use freemarker-middleware:
var app = require('express')()
var freeMarkerMiddleware = require('freemarker-middleware')
app.use(freeMarkerMiddleware(__dirname + '/ftl'))
// ...
options
freeMarkerMiddleware(__dirname + '/ftls')
// OR:
freeMarkerMiddleware({
root: __dirname + '/ftls',
ondir: function(dir, req, res, next) {
// ...
},
getdata: function(req) {
// ...
}
})