No ex. 2, eu inserir o código abaixo e requisitei no navegador, não tenho resposta. Exibe mensagem no console mas não há retorno no navegador. Além disso ele força um download de arquivo desconhecido.
var http = require('http');
var porta = 3000;
var ip = "localhost";
var server = http.createServer(function(req, res) {
console.log("Recebendo request");
res.writeHead( 200, {'Content-Type': 'text/html'});
res.end('<html><body>Request recebido!</body></html>');
});
server.listen(porta, ip);
console.log("Server running at http://" + ip + ":" + porta + "/");