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

Commit

Permalink
[#967] Get surveyUrl from env vars.
Browse files Browse the repository at this point in the history
`BASE_DOMAIN` can be used to construct the survey url when generating
the Index.
  • Loading branch information
brew committed Mar 29, 2017
1 parent a026c31 commit a88af9c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ let baseUrl = `http://${bucketName}`;
if (process.env.INDEX_DOMAIN_SUFFIX === 'dev') {
baseUrl = 'http://localhost:8000';
}
const surveyUrl = `http://${domain}.survey.okfn.org`;
let surveyUrl = `http://${domain}.survey.okfn.org`;
if (process.env.BASE_DOMAIN) {
surveyUrl = `http://${domain}.${process.env.BASE_DOMAIN}`;
}

/* eslint-disable camelcase */
Metalsmith(__dirname)
Expand Down

0 comments on commit a88af9c

Please sign in to comment.