Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store API Base URL in environment #3

Open
1 task
zackharley opened this issue Feb 25, 2019 · 0 comments
Open
1 task

Store API Base URL in environment #3

zackharley opened this issue Feb 25, 2019 · 0 comments

Comments

@zackharley
Copy link
Member

zackharley commented Feb 25, 2019

Issue

It is best practice to store configuration data in the environment. The Pickle Jar Base URL is a prime example of this. Currently we have the URL hard-coded into the application, but it should be passed in from the environment. This way we can test locally with the local version of the cloud functions API as opposed to having our dev environment also point to the production API.

Solution

  • Set components/api.js to pull the BASE_URL from the environment

const BASE_URL = 'https://us-central1-pickle-jar-1fb9f.cloudfunctions.net';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant