Chapter 4: initial recipe samples
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user