Skip to content

gerkon/gerkon-jade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gerkon-jade

const jade = require('gerkon-jade');

app.use(jade);

// Render from string
app.get('/test1', function(req, res){
	res.render('jade string', {
		pageTitle: 'My page title'
	});
});

// Render from file
app.get('/test2', function(req, res){
	res.renderTemplate(__dirname + '/templates/index.jade', {
		pageTitle: 'My page title'
	})
		.then(() => {
			//Page rendered
		})
		.catch(err => {
			//Error happened
		});
});