Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

Commit

Permalink
Merge pull request #23 from urbancups/master
Browse files Browse the repository at this point in the history
Allow using non US Standard S3 regions
  • Loading branch information
niftylettuce committed Nov 18, 2012
2 parents 6f63d02 + 955fbe3 commit dba7e9d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Readme.md
Expand Up @@ -117,7 +117,8 @@ Assets are optimized, minified, mangled, gzipped, delivered by Amazon CloudFront

1. Visit <https://console.aws.amazon.com/s3/home> and click **Create Bucket**.
* Bucket Name: `bucket-name`
* Region: `US Standard`
* Region: `US Standard` (use `options.endpoint`
with `'bucket.s3-xxx.amazonaws.com'` for non `US Standard` regions)
2. Upload <a href="https://raw.github.com/niftylettuce/express-cdn/master/index.html">index.html</a> to your new bucket (this will serve as a placeholder in case someone accesses <http://cdn.your-site.com/>).
3. Select `index.html` in the Objects and Folders view from your S3 console and click **Actions &rarr; Make Public**.
4. Visit <https://console.aws.amazon.com/cloudfront/home> and click **Create Distribution**.
Expand Down Expand Up @@ -180,6 +181,7 @@ var options = {
, viewsDir : path.join(__dirname, 'views')
, domain : 'cdn.your-domain.com'
, bucket : 'bucket-name'
, endpoint : 'bucket-name.s3-eu-west-1.amazonaws.com' // optional
, key : 'amazon-s3-key'
, secret : 'amazon-s3-secret'
, hostname : 'localhost'
Expand Down
1 change: 1 addition & 0 deletions examples/basic.js
Expand Up @@ -11,6 +11,7 @@ var options = {
, viewsDir : path.join(__dirname, 'views')
, domain : 'cdn.your-domain.com'
, bucket : 'bucket-name'
, endpoint : 'bucket-name.s3-eu-west-1.amazonaws.com' // optional
, key : 'amazon-s3-key'
, secret : 'amazon-s3-secret'
, hostname : 'localhost'
Expand Down
1 change: 1 addition & 0 deletions lib/main.js
Expand Up @@ -351,6 +351,7 @@ var processAssets = function(options, results) {
key: options.key
, secret: options.secret
, bucket: options.bucket
, endpoint: options.endpoint
});
// Go through each result and process it
for(var i=0; i<results.length; i+=1) {
Expand Down

0 comments on commit dba7e9d

Please sign in to comment.