Created
June 6, 2012 04:10
-
-
Save ekaqu/2879865 to your computer and use it in GitHub Desktop.
http proxy for s3 based off knox (http://thechangelog.com/post/2128784522/knox-s3-lib)
This file contains hidden or 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
| exports.s3 = { | |
| key: '<api-key-here>' | |
| , secret: '<secret-here>' | |
| , bucket: 'learnboost' | |
| }; |
This file contains hidden or 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
| /* | |
| Run the following to set things up: | |
| npm install knock | |
| */ | |
| var http = require("http"), | |
| config = require("./config.js"), | |
| s3 = require("knox").createClient(config.s3); | |
| http.createServer(function(req, resp) { | |
| s3.get("/path").on("response", function(s3Res) { | |
| s3Res.pipe(resp); | |
| }).end(); | |
| }).listen(8080); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment