Update JS Client to use new API

This commit is contained in:
Pavel Murygin 2023-04-03 05:34:47 +04:00
parent 51254d14fe
commit 97accb04ca

View File

@ -81,12 +81,11 @@ async function start() {
selfPeerId = cl.getPeerId()
console.log("CONNECTED")
peer2 = await createClient()
console.log("CONNECTING TO SECOND:")
peer2 = await createClient(relay2);
peer2.onConnectionStateChange((s) => {
console.log(s)
})
await peer2.connect(relay2)
console.log("CONNECTED")
}