Created
July 30, 2010 08:26
-
-
Save MrJaba/500147 to your computer and use it in GitHub Desktop.
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
//These are required node library files to assist us. | |
var sys = require('sys'), | |
http = require('http'); | |
//http is the http library | |
//so on every request the given function will be called with a request and a response argument. | |
http.createServer(function (req, res) { | |
//write out the response headers | |
res.writeHead(200, {'Content-Type': 'text/html'}); | |
//finish it up with what you want to send to the client | |
res.end("Hello!"); | |
}).listen(8000); //Tell it to listen on port 8000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment