Adapt to whatever host serves the client
This commit is contained in:
parent
a499cb2064
commit
7a793cf2c6
2 changed files with 3 additions and 2 deletions
|
@ -7,7 +7,8 @@
|
|||
"build": "parcel build src/index.html",
|
||||
"clean": "rimraf .cache dist",
|
||||
"live": "parcel src/index.html",
|
||||
"tsc:check": "tsc --noEmit"
|
||||
"watch": "parcel watch src/index.html",
|
||||
"check": "tsc --noEmit"
|
||||
},
|
||||
"author": "Tangent 128",
|
||||
"license": "ISC",
|
||||
|
|
|
@ -18,7 +18,7 @@ import {} from "./net/LoopbackServer";
|
|||
*/
|
||||
|
||||
Select(".GameCanvas").forEachCanvas((c, cx, keys) => {
|
||||
const connection = new Connection<KeyName[], Data>("ws://localhost:9090/base2020.ws");
|
||||
const connection = new Connection<KeyName[], Data>(`ws://${location.host}/base2020.ws`);
|
||||
new Main(c, cx, keys, connection.socket);
|
||||
c.focus();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue