There is an example from the textbook (Pyurival S. Basics of Web Application Development, 2015, p. 197). A virtual machine is created there and the server is started on it in JavaScript, the http and Express module is used.
var express = require("express"), http = require("http"), app = express(); app.use(express.static(__dirname + "/client")); //в папке есть файл index.html http.createServer(app).listen(3000); app.get("/hello", function (req, res) { res.send("Hello, World!"); }); app.get("/goodbye", function (req, res) { res.send("Goodbye, World!"); }); When using the link http: // localhost: 3000 / index.html writes: Cannot GET /index.html. In this case, the previous examples (where there is no request to the files) work, but this one is not. Tell me, please, what to do?