From 1371f48a83bc45bc3c3bbe47ebd12ef4a9b835f9 Mon Sep 17 00:00:00 2001 From: amelia Date: Fri, 17 Jun 2022 17:59:47 -0500 Subject: Create index.js --- index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 index.js diff --git a/index.js b/index.js new file mode 100644 index 0000000..f5f5b4e --- /dev/null +++ b/index.js @@ -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); +}); \ No newline at end of file -- cgit v1.2.3