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

Make a better URL endpoint configuration through environment variables #200

Open
ubaldop opened this issue Oct 25, 2018 · 0 comments · May be fixed by #237
Open

Make a better URL endpoint configuration through environment variables #200

ubaldop opened this issue Oct 25, 2018 · 0 comments · May be fixed by #237

Comments

@ubaldop
Copy link
Collaborator

ubaldop commented Oct 25, 2018

Currently, in order to configure a proper URL endpoint for API requests, there is a strange workaround here:

if (window.location.host === 'fd-vue-webapp.herokuapp.com') {
  FD_API_URL = 'http://174.138.4.3:9111/v3'
} else {
  FD_API_URL = 'http://' + window.location.hostname + ':9111/v3'
}

I think this FD_API_URL instantiation should be performed through an environment configuration, not within the fd-axios.js file itself. I mean like these.

Then, in the Heroku environment the npm run start command shall be invoked setting the proper NODE_ENV (e.g.: test).

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

Successfully merging a pull request may close this issue.

1 participant