Skip to content

Instantly share code, notes, and snippets.

@benbagley
Created September 16, 2019 13:02
Show Gist options
  • Save benbagley/11c3a8f7c7a00df9ba9b3f60d512d7d4 to your computer and use it in GitHub Desktop.
Save benbagley/11c3a8f7c7a00df9ba9b3f60d512d7d4 to your computer and use it in GitHub Desktop.
const http = require('http');
http.createServer((request, response) => {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('Hello World!\n');
}).listen(8080);
console.log('This is my first web server on port 8080');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment