From b832c3083810e76b66d721b8c3c6dbc0ae2e1ab6 Mon Sep 17 00:00:00 2001 From: Raimund Renkert Date: Thu, 3 Mar 2022 15:16:12 +0100 Subject: [PATCH] Introduced .env file for configuration. --- cmd/mtwebmapper/client/src/App.vue | 12 +----------- cmd/mtwebmapper/client/src/store/index.js | 3 +-- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/cmd/mtwebmapper/client/src/App.vue b/cmd/mtwebmapper/client/src/App.vue index 64da6a3..14a7305 100644 --- a/cmd/mtwebmapper/client/src/App.vue +++ b/cmd/mtwebmapper/client/src/App.vue @@ -52,17 +52,7 @@ export default { return { drawer: false, fixed: false, - layerItems: [ - { - icon: 'mdi-apps', - title: 'Points of Interest', - }, - { - icon: 'mdi-chart-bubble', - title: 'Buildings', - }, - ], - title: 'Minetest - Map of the Real World', + title: process.env.VUE_APP_TITLE, } }, computed: { diff --git a/cmd/mtwebmapper/client/src/store/index.js b/cmd/mtwebmapper/client/src/store/index.js index 4baebf8..b89e452 100644 --- a/cmd/mtwebmapper/client/src/store/index.js +++ b/cmd/mtwebmapper/client/src/store/index.js @@ -77,8 +77,7 @@ export default new Vuex.Store({ runAutoUpdate: function({ commit, state, dispatch}) { var me = this; - // TODO: Make the URL to websocket configurable via .env - state.socket = new WebSocket('ws://' + window.location.host + '/socket'); + state.socket = new WebSocket(process.env.VUE_APP_WEBSOCKET_URL); state.socket.onerror = function() { commit('setAutoUpdate', false)