I have created a JavaScript program which generates a list of data. Example output below:
output one
output two
output three
...
I would
Although @yanick-rochon answer is correct, the simplest way to achieve your goal (if it's to serve a dynamically generated html) is:
var http = require('http');
http.createServer(function (req, res) {
res.write('');
res.write('Write your HTML content here
');
res.end('');
}).listen(1337);
This way when you browse at http://localhost:1337
you'll get your html page.