Skip to content

Instantly share code, notes, and snippets.

@tanyagupta
Created December 3, 2016 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tanyagupta/1b93acf8b55ea9efc15080e9f2ed701c to your computer and use it in GitHub Desktop.
Save tanyagupta/1b93acf8b55ea9efc15080e9f2ed701c to your computer and use it in GitHub Desktop.
Simple Hello Word using http in node
var http = require("http");
var server = http.createServer(function(request, response) {
response.writeHead(200, {"Content-Type": "text/html"});
response.write("<h1>Hello World</h1>");
response.end();
});
server.listen(8080);
console.log("Server is listening");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment