Skip to content
This repository has been archived by the owner. 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

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

@jcjimenez jcjimenez Jul 5, 2017

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

@c-w c-w Jul 5, 2017

Sounds good. Will make a follow up PR.

@c-w c-w merged commit 2aaede6 into master Jul 5, 2017
2 checks passed
@c-w c-w deleted the protocol-from-env branch Jul 5, 2017
@c-w c-w mentioned this pull request Jul 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants