use classic functions instead of es6 fix peers.find should be peers.findIndex for splice.
Connects server websocket by event to gun.... (would have complicated with alternative websocket interfaces and protocol handlings... but left some comments about that)