client
import * as Colyseus from "colyseus.js";
var host = (window.document.location.host || "localhost").replace(/:.*/, '');
var client = new Colyseus.Client('ws://' + host + ':2657');
server: https://github.com/gamestdio/colyseus-examples/blob/master/index.ts
Error ( using Chrome):
index.js:5 WebSocket connection to 'ws://localhost:2657/?colyseusid=Byj_N10bm' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED