Chapter 4,6: prettier updates and web framework samples
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user