i can connect with browser y-websocket but not with node (it loop in 'connecting' status) version using
(don't forget to put "type":"module", in package.json to use es6 as mentionned in https://github.com/yjs/y-websocket/issues/170
but i can connect to 127.0.0.1:1234 too with node is there something needing for firewall or something ?
import * as Y from "yjs";
import * as W from "y-websocket";
import WebSocket from "ws";
const doc = new Y.Doc()
const wsProvider = new W.WebsocketProvider(
"wss://ylm-websocket.glitch.me",
'my-roomname',
doc,
{ WebSocketPolyfill: WebSocket }
);
wsProvider.on('status', event => {
console.log(event.status)
})
hosted y-websocket server on https://glitch.com/edit/#!/ylm-websocket (wait 30 seconds, for the server to start)
is ok
i can connect with browser y-websocket but not with node (it loop in 'connecting' status) version using (don't forget to put
"type":"module",
in package.json to use es6 as mentionned in https://github.com/yjs/y-websocket/issues/170but i can connect to 127.0.0.1:1234 too with node is there something needing for firewall or something ?