I wrote the application in node.js which collects data in the MongoDB database. I.e.:
- name: John
- pagename: mypage
- links: [link1, link2, link3]
I need to create static HTML pages with pagename.mydomainname.com, put content from variables (name, link1, link2..) inside this HTML pages
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<p>My name is - name</p>
<p>My link 1 is - link1</p>
<p>My link 2 is - link2</p>
<p>My link 3 is - link3</p>
</body>
</html>
And store this HTML files on the server in the special folder. How to do it using Nodejs?