I learnt that JADE is a template language and it is preferred engine for express.
What are the advantages of using JADE instead of html ? Is it possible to use html directly instead of using jade ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Jade has a cleaner, more readable syntax and comes with filters and helpers: https://github.com/visionmedia/jade#a7
If you’re going to migrate HTML files to jade, this converter might come handy:
http://html2jade.aaron-powell.com/
…but you can also use HTML.
http://expressjs.com/guide.html#view-rendering
I’m using EJS ( http://code.google.com/p/embeddedjavascript/) as the rendering engine in my express app, but keep a .html suffix on the template files like this:
(requires ejs be installed, which you can easily do via
npm install ejs)