Use a different websocket URI for dev versus prod
This commit is contained in:
parent
cb88f7e741
commit
2c6d22e922
1 changed files with 7 additions and 1 deletions
|
|
@ -7,8 +7,14 @@ import VueSocketIOExt from 'vue-socket.io-extended';
|
|||
|
||||
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(VueSocketIOExt, io(`http://${window.location.hostname}:8081`));
|
||||
Vue.use(VueSocketIOExt, io(websocket_uri));
|
||||
|
||||
new Vue({
|
||||
store,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue