Skip to content

Instantly share code, notes, and snippets.

@bingeboy
Created June 28, 2013 05:52
Show Gist options
  • Save bingeboy/5882724 to your computer and use it in GitHub Desktop.
Save bingeboy/5882724 to your computer and use it in GitHub Desktop.
pipe with get call from request... quick and dirty!
//get image with request and pipe it to client.
var http = require('http');
var request = require('/usr/local/share/npm/lib/node_modules/request');
var server = http.createServer(function (req, res) {
request.get('http://www.1up.com/images/Elements/carouselNav.png').pipe(res);
});
server.listen(8000);
console.log('server.listen(8000)')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment