Skip to content

Instantly share code, notes, and snippets.

@singledigit
Last active November 1, 2018 02:02
Show Gist options
  • Save singledigit/64048c9770e06f1662d2a72605f0c67f to your computer and use it in GitHub Desktop.
Save singledigit/64048c9770e06f1662d2a72605f0c67f to your computer and use it in GitHub Desktop.
const http = require('http');
const hostname = '0.0.0.0';
const port = process.env.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);
const http = require('http');
const hostname = '0.0.0.0';
const port = process.env.PORT || 3000;
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World, I have been updated!!\n');
});
server.listen(port, hostname);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment