I've updated the line:
ApiService.vueInstance.axios.defaults.baseURL = process.env.MY_API_URL;
(MY_API_URL = "https://localhost:7100") just for reference
in order to point the app at my locally running API, but not matter what the base URL is always http://localhost:8080 (the location the app is running under) when an Axios call get's executed. Am I missing something here?
Hi Ben,
We are using the VUE_APP_API_URL variable from the .env file inside the demo folder.
Most likely your MY_API_URL variable is undefined, to use .env variables in Vue, variable name should start with VUE_APP_, instead of MY_API_URL you should use VUE_APP_MY_API_URL.
Regards,
Lauris Stepanovs,
Keenthemes Support Team
The APIservice uses the .env file to run.
Reference this
https://preview.keenthemes.com/metronic8/vue/docs/#/api-setup