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

Allow environment to override http/https for apis #44

Merged
merged 1 commit into from
Jul 5, 2017
Merged

Conversation

c-w
Copy link
Contributor

@c-w c-w commented Jul 5, 2017

As per standup today: environment variables should be able to override whether we talk to services via http or https.

Copy link
Contributor

@jcjimenez jcjimenez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -4,10 +4,10 @@ const Promise = require('promise');
const request = require('request');

const accessToken = process.env.FACEBOOK_AUTH_TOKEN;
const apiHost = process.env.FACEBOOK_API_HOST || 'graph.facebook.com';
const apiHost = process.env.FACEBOOK_API_HOST || 'https://graph.facebook.com';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The host part in the variable name seems misleading to me; may I suggest 'const baseUrl' maybe as a followup PR at some point?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Will make a follow up PR.

@c-w c-w merged commit 2aaede6 into master Jul 5, 2017
@c-w c-w deleted the protocol-from-env branch July 5, 2017 17:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants