diff --git a/.env b/.env new file mode 100644 index 0000000..d3f895e --- /dev/null +++ b/.env @@ -0,0 +1 @@ +VUE_APP_ROOT_URL = http://lelong-admin.test/api \ No newline at end of file diff --git a/src/components/authentication/TheLogin.vue b/src/components/authentication/TheLogin.vue index 6f75c78..56c65c1 100644 --- a/src/components/authentication/TheLogin.vue +++ b/src/components/authentication/TheLogin.vue @@ -10,7 +10,7 @@ " >
diff --git a/src/interceptors/axios.js b/src/interceptors/axios.js index 2c970db..873f024 100644 --- a/src/interceptors/axios.js +++ b/src/interceptors/axios.js @@ -3,12 +3,4 @@ import axios from "axios"; const tokenKey = "token"; axios.defaults.headers.common['X-CSRF-TOKEN'] = tokenKey; -// local api -axios.defaults.baseURL = "http://lelong-admin.test/api"; - -// local api - public -// axios.defaults.baseURL = "http://127.0.0.1:8080/api"; - -// production api -// axios.defaults.baseURL = "https://bida.arrahn.com.my/api"; - +axios.defaults.baseURL = process.env.VUE_APP_ROOT_URL; \ No newline at end of file