1const http = require('http')
2const fs = require('fs')
3
4const server = http.createServer((req, res) => {
5 res.writeHead(200, { 'content-type': 'text/html' })
6 fs.createReadStream('index.html').pipe(res)
7})
8
9server.listen(process.env.PORT || 3000)
10