I have configured my axios like this
const axiosConfig = {
baseURL: \'http://127.0.0.1:8000/api\',
timeout: 30000,
};
Vue.prototype.$axios = axios.create(ax
VUE_APP_API_ENDPOINT ='http://localtest.me:8000'
axios.defaults.baseURL = process.env.VUE_APP_API_ENDPOINT
And that's it. Axios default base Url is replaced with build mode specific API endpoint. If you need specific baseURL for specific request, do it like this:
this.$axios({ url: 'items', baseURL: 'http://new-url.com' })