Adapt to whatever host serves the client

This commit is contained in:
Tangent 2020-06-10 00:41:11 -04:00
parent a499cb2064
commit 7a793cf2c6
2 changed files with 3 additions and 2 deletions

View file

@ -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();
});