Skip to content

Instantly share code, notes, and snippets.

@silentrob
Created April 8, 2011 04:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save silentrob/909307 to your computer and use it in GitHub Desktop.
Save silentrob/909307 to your computer and use it in GitHub Desktop.
Connect Stream mp4 Example
require('connect').createServer(
connect.static(__dirname + '/videos', { maxAge: 0 }),
function(req, res) {
res.setHeader('Content-Type', 'text/html');
res.end('<video width="300px" src="/OLD_BOY.mp4" controls="controls" autoplay="autoplay"></video>');
}
).listen(process.env.PORT || 4000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment