Also try to use the following code snippet as a "Hello world" app:
const http = require('http');
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World\n');
});
server.listen(0, '0.0.0.0', () => {...