Last active
August 16, 2022 16:56
-
-
Save rcoedo/ee5288dc101ec8e67abef3fff4f682fd 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
This gist contains the examples for the article "Debugging Node.js Applications, Part One". | |
- https://medium.com/trabe/debugging-node-js-applications-part-1-f1cca5084356 | |
- https://rcoedo.com/blog/2018/10/01/debugging-node-js-applications-part-one |
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
const http = require("http"); | |
const hostname = "127.0.0.1"; | |
const port = 3000; | |
const server = http.createServer((req, res) => { | |
res.statusCode = 200; | |
res.setHeader("Content-Type", "text/plain"); | |
res.end("Hello World\n"); | |
}); | |
server.listen(port, hostname, () => { | |
console.log(`The server is running at http://${hostname}:${port}/`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment