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
src
|
@ -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…
Add table
Add a link
Reference in a new issue