Create index.js

This commit is contained in:
grant-kun 2022-06-17 17:59:47 -05:00
parent 8aa56e12b5
commit 31a98da73d
1 changed files with 13 additions and 0 deletions

13
index.js Normal file
View File

@ -0,0 +1,13 @@
var http = require('http');
var fs = require('fs');
const PORT=3000;
fs.readFile('./index.html', function (err, html) {
if (err) throw err;
http.createServer(function(request, response) {
response.write(html);
}).listen(PORT);
});