How do you render an html file while keeping the templating engine as jade ?
app.set('view engine', 'jade'); is where i've set the templating engine as jade and I want to do something like
app.get('/world', function(req,res){
res.render('profile.html', );
To render the html file.
I'm programming in node.js using express.js.
Note: i've already require html using var html=require('html');
Edit:
I understand res.render need not be used as html is already rendered. res.send(profile.html); gives error of profile is undefined
You can render jade files (.jade) but not html files as the result will be the html. What do you mean by rendering the html file?
Replace your res.render('profile.html') by res.sendfile('[path_to_the_file]profile.html')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With