How to use Node.js to build pages that are a mix between static and dynamic content?

前端 未结 7 1086
隐瞒了意图╮
隐瞒了意图╮ 2020-12-07 23:02

All pages on my 5 page site should be output using a Node.js server.

Most of the page content is static. At the bottom of each page, there is a bit of dynamic conten

7条回答
  •  既然无缘
    2020-12-07 23:44

    One good way is to use a templating engine. You can store the templates as separate files, and the templating engine has the ability to make the content dynamic. Personally I use yajet (http://www.yajet.net/) which is written for the web but works fine with node, and there are numerous template engines for node on npm.

提交回复
热议问题