Skip to content

Instantly share code, notes, and snippets.

@mtdowling
Created July 25, 2013 17:13
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 mtdowling/6081827 to your computer and use it in GitHub Desktop.
Save mtdowling/6081827 to your computer and use it in GitHub Desktop.
Simple node.js server
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