Created
December 3, 2016 20:40
-
-
Save tanyagupta/1b93acf8b55ea9efc15080e9f2ed701c to your computer and use it in GitHub Desktop.
Simple Hello Word using http in node
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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