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

Commit

Permalink
[#967] Use INDEX_STAGING_DOMAIN when constructing baseUrl
Browse files Browse the repository at this point in the history
Use `INDEX_STAGING_DOMAIN`, if it exists, when constructing `baseUrl`.
This is useful when in staging and want to append the AWS domain.
  • Loading branch information
brew committed Mar 29, 2017
1 parent a88af9c commit 8eb666b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index/generate.js
Expand Up @@ -171,6 +171,10 @@ const year = options.year;
const bucketSite = (isGodi) ? '' : `${domain}-`;
const bucketName = `${bucketSite}index${indexDomainSuffix}.okfn.org`;
let baseUrl = `http://${bucketName}`;
// Add INDEX_STAGING_DOMAIN, if it exists.
if (process.env.INDEX_STAGING_DOMAIN) {
baseUrl = `${baseUrl}.${process.env.INDEX_STAGING_DOMAIN}`;
}
if (process.env.INDEX_DOMAIN_SUFFIX === 'dev') {
baseUrl = 'http://localhost:8000';
}
Expand Down

0 comments on commit 8eb666b

Please sign in to comment.