Created
December 25, 2013 09:13
-
-
Save DarrylDias/8121611 to your computer and use it in GitHub Desktop.
Hello World! written in nodeJS
This file contains 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
/* This will display Hello World! on client's web browser. | |
The code below will not show up in the source. Only "<strong>Hello World!</strong>" will be visible in source. | |
*/ | |
var http = require('http'); | |
http.createServer(function (req,res) { | |
res.writeHead(200, {'Content-Type:' 'text/html'}); | |
res.end('<strong>Hello World!</strong>'); | |
}).listen(80, '0.0.0.0'); | |
console.log('Web Server running on port:80 on server ip'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment