Closed paulodiovani closed 5 years ago
Reopened, I notice an issue when using port 80 on heroku. Probably on other servers too:
src/api.js
80
(parseInt or compare as string), do not add port to the endpoint (eg: ${host}/api/v1/pulls/${year}
.env.example
VUE_APP_DEFAULT_BACKEND_HOST=//localhost
(not http(s), so we don't need to care about the protocol).
Describe the bug
We need to have a better control over env vars to allow the project to run on a web server. In short, we need a way to inform the correct backend url.
Changes to do
Update
src/api.js
and set:process.env.VUE_APP_DEFAULT_BACKEND_HOST || 'http://localhost'
process.env.VUE_APP_DEFAULT_BACKEND_PORT || 8001
axios.get(
${host}:${port}/api/v1/pulls/${year})
VUE_APP_DEFAULT_BACKEND_HOST
to.env.example