how to set filters of koa-swig when I use it in koa-views
like this:
var views = require('koa-views');
app.use(views(__dirname + 'views', {
map:{
html: 'swig'
},
filters:{
getAppEnv:function(){
return env.toLowerCase();
}
}
}));
or like this:
var views = require('koa-views');
app.use(views(__dirname + 'views', {
map:{
html: 'swig'
},
options:{
filters:{
getAppEnv:function(){
return env.toLowerCase();
}
}
}
}));
two mode both are useless...Is there any problem?
how could I set filters via koa-views...
thank u!
how to set filters of koa-swig when I use it in koa-views
like this:
or like this:
two mode both are useless...Is there any problem?
how could I set filters via koa-views...
thank u!