fancy
fancy

Reputation: 51383

How can I serve an index.jade?

I'm using express, and writing my views in jade. One of them is an index.jade file, id like to serve this file as you would an .html. How would I do this? I tried res.sendfile('views/index.jade') and res.sendfile('views/index.html')

Thanks!

Upvotes: 1

Views: 399

Answers (1)

ming_codes
ming_codes

Reputation: 2922

To render a page, you need to use

res.render('index');

Upvotes: 4

Related Questions