aboutsummaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
authoramelia <[email protected]>2022-06-17 17:59:47 -0500
committeramelia <[email protected]>2022-06-17 17:59:47 -0500
commit1371f48a83bc45bc3c3bbe47ebd12ef4a9b835f9 (patch)
tree4df60854fb45e619087dd1069c8af80fbab87567 /index.js
parent7ae50bd9541ec2bbb9c9f88070ca84bace99b6c6 (diff)
Create index.js
Diffstat (limited to 'index.js')
-rw-r--r--index.js13
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