Created
July 25, 2013 17:13
-
-
Save mtdowling/6081827 to your computer and use it in GitHub Desktop.
Simple node.js server
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
var http = require("http"); | |
http.createServer(function(req, res) { | |
req.addListener("data", function(chunk) { | |
// Read data chunks | |
}); | |
// Called when the request completes | |
req.addListener("end", function() { | |
res.writeHead(200, "OK", { "Content-Length": 10 }); | |
res.end("testing123"); | |
}); | |
}).listen(8124, '127.0.0.1') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment