S
S
Shrt2016-11-27 20:45:00
JavaScript
Shrt, 2016-11-27 20:45:00

Using only HTML in a node.js application as the main view engine (pros and cons)?

I started learning node.js to develop my own application and met such a feature as using such view engines as .ejs .jade and so on. After searching on Google, I realized that it is recommended to use them and not just HTML files. What if I want to use only pure HTML5, so that node.js is just a server-side language that sends static files to the user, like in the case of Apache? The difficulty is that I am working on a dynamic application, with blog and social network features. Will there be any problems if you don't use the recommended view engines but just HTML?
Thanks everyone for the replies!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly, 2016-11-27
@Shrt

In a dynamic application, you will not be able to send static files, let's start with this.
If you still need to send static, you can also set up just a server on node.js without anything extra. Start with express - the most popular node.js module for organizing a simple server.

P
pomeo, 2016-11-28
@pomeo

Take mustache and you won't have to rewrite your html in jade

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question