You can use built-in nodejs web server.
Add file server.js
for example and put following code:
var http = require('http');
var fs = require('fs');
const PORT=8080;
fs.readFile('./index.html', function (err, html) {
if (err) throw err;
http.createServer(function(request, response) {
response.writeHeader(200, {"Content-Type": "text/html"});
response.write(html);
response.end();
}).listen(PORT);
});
And after start server from console with command node server.js
. Your index.html page will be available on URL http://localhost:8080
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…