peers / peerjs-server

Server for PeerJS
https://peerjs.com
MIT License
4.26k stars 1.08k forks source link

Deployig own peerjs server #455

Open Ravindu007 opened 1 month ago

Ravindu007 commented 1 month ago

Please, check for existing issues to avoid duplicates.

What happened?

I have deployed a peerjs server (with the help of your documetatio) and I have verified that it is working (usig postman) The problem is whe trying to conect to it it shows a wrog URL Error I am getting:

RoomContext.tsx:198 WebSocket connection to 'ws://dev.learnerr.rizerr.com:9000/peers/peerjs?key=peerjs&id=65b9f56dc5de0c20ff6716f6&token=m5c78415z0q&version=1.5.2' failed:

below is my client code: const peer = new Peer(currentPeerId,{ host:"dev.learnerr.rizerr.com", port:9000, path:"/peers" });

server code PeerServer({ port: 9000, path: "/peers" });

I have noticed thart additioal "peerjs" part has appened to the URL. please help me o this issue.

How can we reproduce the issue?

  1. Try to deploy your own peer server and try to connect to it.

What do you expected to happen?

connect without any issues

Environment setup

Is this a regression?

No response

Anything else?

Note: I am using Nginx for server configuration

No response

narasimha-1511 commented 1 month ago

Hey i am also stuck with the same issue 😞

Ravindu007 commented 1 month ago

@narasimha-1511 It was a problem with the SSL certificate of the host, this is happen due to sending a WSS request, so try to host the peer server where you have configured https. And also add your own turn server