Introduced .env file for configuration.

This commit is contained in:
Raimund Renkert 2022-03-03 15:16:12 +01:00
parent 6339275b5b
commit b832c30838
2 changed files with 2 additions and 13 deletions

View File

@ -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: {

View File

@ -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)