I
I
Ingerniated2018-03-23 12:19:45
Node.js
Ingerniated, 2018-03-23 12:19:45

How to change or add data in the sent html document from the server?

Good afternoon, please tell me how to insert strings into html from the server?
For example, in PHP this was explicitly inserted by the code with the PHP tag

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h1><?php echo "My first PHP script!";?></h1>
</body>
</html>

How to do it in node?
Or how it is called correctly so that the search engine gives the desired result, otherwise there are only examples everywhere, how to display a simple html page.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
RidgeA, 2018-03-23
@Ingernirated

here is an example - expressjs.com/en/guide/using-template-engines.html
The principle is the same for any other framework and template engine

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question