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

Already on GitHub? Sign in to your account

add swig example #4

Open
chovy opened this Issue Dec 17, 2012 · 0 comments

Comments

Projects
None yet
1 participant
Owner

chovy commented Dec 17, 2012

var consolidate = require('consolidate'),
    swig = require('swig');

app.set('view engine', 'html');
app.set('views', __dirname + '/views');
app.engine('.html', consolidate.swig);

app.get('/test', function(req, res) {
    res.render('two');
});

/* Tell swig where to look for templates when one extends another. */
swig.init({ root: __dirname + '/views' });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment