Websocket not connecting

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

@drevantonder

Sorry for the confusion, colyseus-examples is binding the server on port 2567, and your client is trying to connect to 2657. I'll update the ports on the demonstration projects to avoid this confusion.

Cheers

@endel Thanks