diff options
author | amelia <[email protected]> | 2022-06-17 17:59:47 -0500 |
---|---|---|
committer | amelia <[email protected]> | 2022-06-17 17:59:47 -0500 |
commit | 1371f48a83bc45bc3c3bbe47ebd12ef4a9b835f9 (patch) | |
tree | 4df60854fb45e619087dd1069c8af80fbab87567 /index.js | |
parent | 7ae50bd9541ec2bbb9c9f88070ca84bace99b6c6 (diff) |
Create index.js
Diffstat (limited to 'index.js')
-rw-r--r-- | index.js | 13 |
1 files changed, 13 insertions, 0 deletions
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 |