What setup should i use to have a bunch of HTML (*.html) files - some of them having server side code (<?= 'Hello world'?>
) - acting as javascript server pages on a node.js server?
Asked
Active
Viewed 129 times
0

John Slegers
- 45,213
- 22
- 199
- 169

Christian Rémillard
- 31
- 1
- 5
-
4Did you try using Express? It allows you to have separate directories for pages that you can render on the server and those that have static HTML data. – Chetan Bhasin May 20 '14 at 15:29
-
Yes I'm using Express. The thing is I'm building on top of a preexisting static html site. I'd like to add some server side processing using Node/Express as a server pages language in those files. – Christian Rémillard May 20 '14 at 16:50
1 Answers
0
Since you're already using express, but aren't aware of server side templating options available, why don't you give the ExpressWorks tutorial a go!
https://github.com/azat-co/expressworks
It provides very simple instructions on installation and setup, and introduces a templating engine called Jade
. I believe this is one valid option that can handle what you're looking for.

dskoda1
- 109
- 10