Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple hello world in Node, using native HTTP for Medium post
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