Created
June 28, 2013 05:52
-
-
Save bingeboy/5882724 to your computer and use it in GitHub Desktop.
pipe with get call from request... quick and dirty!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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