Skip to content

Instantly share code, notes, and snippets.

@AndyNovo
Last active September 30, 2019 11:56
Show Gist options
  • Save AndyNovo/4ba39d79813556a0d3c8 to your computer and use it in GitHub Desktop.
Save AndyNovo/4ba39d79813556a0d3c8 to your computer and use it in GitHub Desktop.
var http = require("http");
console.log("Started server");
var myServer = http.createServer(function(request, response){
console.log(request);
console.log(response);
response.setHeader('Content-Type', 'text/html');
response.write("<p>Hello there</p>");
response.end("<p>I think I'm done</p>");
});
myServer.listen(8080);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment