0
0
Fork 0

Use a different websocket URI for dev versus prod

This commit is contained in:
Oliver-Akins 2021-01-05 13:45:22 -07:00
parent cb88f7e741
commit 2c6d22e922

View file

@ -7,8 +7,14 @@ import VueSocketIOExt from 'vue-socket.io-extended';
Vue.config.productionTip = false; Vue.config.productionTip = false;
// Get the URI for
let websocket_uri = `/`;
if (process.env.NODE_ENV === `development`) {
websocket_uri = `http:${window.location.hostname}:8081`;
};
Vue.use(clipboard); Vue.use(clipboard);
Vue.use(VueSocketIOExt, io(`http://${window.location.hostname}:8081`)); Vue.use(VueSocketIOExt, io(websocket_uri));
new Vue({ new Vue({
store, store,