Файл server.js выглядит следующим образом:
Код: Выделить всё
var http = require("http");
http.createServer(function(request, response) {
response.writeHead(200, {"Content-Type": "text/plain"});
response.write("Hello World");
response.end();
}).listen(8080);
Код: Выделить всё
http://localhost:8080/
Код: Выделить всё
http://localhost:8080/test.html
Подробнее здесь: https://stackoverflow.com/questions/298 ... alhost-url