Created
May 24, 2019 21:37
-
-
Save weienwong/0705d32bf4d62a75b07d0b6dfcac3e9b to your computer and use it in GitHub Desktop.
This file contains 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
server.on("request", (req, res) => { | |
const src = fs.createReadStream("./index.html"); | |
src.pipe(res) | |
}) | |
console.log(`Running on port ${port}`); | |
server.listen(port); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment