Skip to content

Instantly share code, notes, and snippets.

@pgte
Created August 31, 2010 14:34
Show Gist options
  • Save pgte/559114 to your computer and use it in GitHub Desktop.
Save pgte/559114 to your computer and use it in GitHub Desktop.
var http = require('http');
var fs = require('fs');
var sys = require('sys');
var filename = 'test.mov';
var content_type = 'video/quicktime';
http.createServer(function (request, response) {
response.writeHead(200, {
'Content-Type': content_type
});
sys.pump(fs.createReadStream(filename), response);
}).listen(8124);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment