Chapter 4,6: prettier updates and web framework samples

This commit is contained in:
Beth Griggs
2020-05-31 19:31:42 +01:00
parent b43bf2c378
commit 0d8170c265
43 changed files with 4820 additions and 242 deletions
+7 -7
View File
@@ -1,11 +1,11 @@
const fs = require('fs')
const http = require('http')
const fs = require("fs");
const http = require("http");
const index = fs.readFileSync('public/index.html')
const index = fs.readFileSync("public/index.html");
const server = http.createServer((req, res) => {
res.setHeader('Content-Type', 'text/html')
res.end(index)
})
res.setHeader("Content-Type", "text/html");
res.end(index);
});
server.listen(8080)
server.listen(8080);