Last active
September 13, 2018 11:55
-
-
Save robinglen/0201729c126ca3dfc5383b8475da5585 to your computer and use it in GitHub Desktop.
Simple hello world in Node, using native HTTP for Medium post
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 port = 8123; | |
const server = http.createServer((req, res) => { | |
res.write('Hello World'); | |
res.end(); | |
}); | |
server.listen(port, () => { | |
console.log(`HTTP "Hello World" listening on port ${port}`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment