diff --git a/.env.dist b/.env.dist new file mode 100644 index 0000000..76fc7ba --- /dev/null +++ b/.env.dist @@ -0,0 +1,2 @@ +VITE_API_URL= +VITE_WEBSOCKET_URL= \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1eae0cf..3fa71d9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ dist/ node_modules/ +**/.env \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index 9b26ef1..bd2bf10 100644 --- a/src/App.vue +++ b/src/App.vue @@ -48,7 +48,7 @@ export default defineComponent({ store.dispatch('loadAuth') console.log("Starting connection to WebSocket Server") - this.connection = new WebSocket("wss://zierle-training.riezel.com/ws/notifications/") + this.connection = new WebSocket(import.meta.env.VITE_WEBSOCKET_URL) this.connection.onmessage = function(event) { console.log(event); diff --git a/src/api/index.js b/src/api/index.js index 927966b..ba0579f 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -4,7 +4,7 @@ import createAuthRefreshInterceptor from 'axios-auth-refresh'; import store from '../store' const apiClient = axios.create({ - baseURL: 'https://zierle-training.riezel.com/api/v1', + baseURL: import.meta.env.VITE_API_URL, withCredentials: false, timeout: 10000, headers: {