Created
November 18, 2021 21:59
-
-
Save LiorB-D/6380871d2676144a5093dbcaf9f772fb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const http = require('http') | |
| const fs = require('fs') | |
| const server = http.createServer((req, res) => { | |
| res.writeHead(200, { 'content-type': 'text/html' }) | |
| fs.createReadStream('PUT THE NAME OF YOUR HTML FILE HERE').pipe(res) | |
| }) | |
| server.listen(process.env.PORT || 3000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment