[313-remote-conn] allow remote connections to the websocket bridge (#314)

* [313-remote-conn] feat: compute wsURL based on window.location

* [313-remote-conn] feat: allow any host to connect to vue server

removing the 'host: "localhost"' specification causes the development
server to listen on all interfaces.

* [313-remote-conn] feat: allow any host to connect to angular dev server

* test: reinject tabs

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
This commit is contained in:
Travis McLane 2020-01-02 05:43:34 -06:00 committed by Lea Anthony
commit 34ef3de737
4 changed files with 4 additions and 6 deletions

View file

@ -3,7 +3,7 @@
"version": "0.0.0",
"scripts": {
"ng": "npx ng",
"start": "npx ng serve --poll=2000",
"start": "npx ng serve --poll=2000 --host=0.0.0.0",
"build": "npx ng build --single-bundle true --output-hashing none --prod --bundle-styles false",
"test": "npx ng test",
"lint": "npx ng lint",

View file

@ -37,7 +37,6 @@ module.exports = {
}
},
devServer: {
disableHostCheck: true,
host: "localhost"
disableHostCheck: true
}
};

View file

@ -37,7 +37,6 @@ module.exports = {
}
},
devServer: {
disableHostCheck: true,
host: "localhost"
disableHostCheck: true
}
};

View file

@ -14,7 +14,7 @@ function init() {
window.wailsbridge = {
reconnectOverlay: null,
reconnectTimer: 300,
wsURL: 'ws://localhost:34115/bridge',
wsURL: 'ws://' + window.location.hostname + ':34115/bridge',
connectionState: null,
config: {},
websocket: null,