Skip to content

Instantly share code, notes, and snippets.

@berb
Created January 2, 2011 19:16
Show Gist options
  • Save berb/762748 to your computer and use it in GitHub Desktop.
Save berb/762748 to your computer and use it in GitHub Desktop.
var url = require('url');
var http = require('http');
var stream = require('stream');;
var path = require('path');
http.createServer(function(req, res) {
res.writeHead(200, {
'Content-Type' : 'text/plain'
});
path.exists('/tmp',function(exists){
req.on('data', function(chunk){
console.log(chunk);
});
});
}).listen(8124, "127.0.0.1");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment