Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some question about koa-swig in using koa-views #23

Open
Froguard opened this issue Sep 13, 2016 · 0 comments
Open

some question about koa-swig in using koa-views #23

Froguard opened this issue Sep 13, 2016 · 0 comments

Comments

@Froguard
Copy link

Froguard commented Sep 13, 2016

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant