Skip to content

Instantly share code, notes, and snippets.

@pgte
Created September 15, 2010 11:29
Show Gist options
  • Save pgte/580597 to your computer and use it in GitHub Desktop.
Save pgte/580597 to your computer and use it in GitHub Desktop.
var sys = require('sys'),
spawn = require('child_process').spawn,
http = require('http');
http.createServer(function (request, response) {
response.writeHead(200, {'Content-Type': 'text/plain'});
var cat = spawn('tail', ['-f', '/var/log/system.log']);
cat.stdout.on('data', function(data) {
response.write(data);
});
}).listen(8124);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment