diff --git a/2021-03-19_axios-01-start/src/components/dashboard/dashboard.vue b/2021-03-19_axios-01-start/src/components/dashboard/dashboard.vue index d1e84b0..b585b3f 100644 --- a/2021-03-19_axios-01-start/src/components/dashboard/dashboard.vue +++ b/2021-03-19_axios-01-start/src/components/dashboard/dashboard.vue @@ -15,7 +15,7 @@ export default { } }, created(){ - axios.get("https://axios-test-44b62-default-rtdb.europe-west1.firebasedatabase.app/users.json") + axios.get('/users.json') .then(response => { console.log(response) const data = response.data diff --git a/2021-03-19_axios-01-start/src/main.js b/2021-03-19_axios-01-start/src/main.js index edba3f2..99aefcb 100644 --- a/2021-03-19_axios-01-start/src/main.js +++ b/2021-03-19_axios-01-start/src/main.js @@ -4,6 +4,8 @@ import App from './App.vue' import router from './router' import store from './store' +import axios from "axios" +axios.defaults.baseURL = "https://axios-test-44b62-default-rtdb.europe-west1.firebasedatabase.app" new Vue({ el: '#app', router,