Reputation: 13850
In php you use <?php ?>
to execute php code inside an html doc. How do you do that in Nodejs
Upvotes: 1
Views: 80
Reputation: 395
you can use the template jade useing express framework for nodejs. https://github.com/visionmedia/jade#readme
Upvotes: 0
Reputation: 26930
You should use template engine. See ejs, or jade for example.
If you are using Express nodejs framework, then it is very comfortable to use jade. There is also template engine called Bliss which is like Razor Engine in ASP.NET
Upvotes: 1