Chapter 4: initial recipe samples

This commit is contained in:
Beth Griggs
2020-04-29 22:00:34 +01:00
parent 503edc4ec2
commit bcf782f7dc
59 changed files with 471 additions and 655 deletions
+11
View File
@@ -0,0 +1,11 @@
const fs = require('fs')
const http = require('http')
const index = fs.readFileSync('public/index.html')
const server = http.createServer((req, res) => {
res.setHeader('Content-Type', 'text/html')
res.end(index)
})
server.listen(8080)