Skip to content

Instantly share code, notes, and snippets.

@robinglen
Last active September 13, 2018 11:55
Show Gist options
  • Save robinglen/0201729c126ca3dfc5383b8475da5585 to your computer and use it in GitHub Desktop.
Save robinglen/0201729c126ca3dfc5383b8475da5585 to your computer and use it in GitHub Desktop.
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