-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using with socket.io and express #192
Comments
so if anyone runs into this: no, you cannot run with express and socket.io at the same time. peerjs now seems to use the same websocket attachment to express than socketio. run a separate peerserver. |
Hi. I am facing the same issue. Please can u explain a but more about how to run a separate peerserver. Thanks! |
@Dummy26 Create it directly like https://github.com/peers/peerjs-server#create-a-custom-server |
I am having issues because of this combo as well. I am running my Express App on Heroku and I only have a single port which I can use. This is why I would like to use the ExpressPeerServer and not a separate one. Where do you deploy your app when you have a port for your Express Server and one for the Peer Server? @brunobg EDIT: |
Same problem too, I'm not willing to use two different websockets just due to the laziness of the developers of this project. |
This issue should be locked. I'm the OP of this issue. This is not a bug and I understand very well why it was implemented like this. If someone reaches this from Google, final guideline:
I won't post anymore on this issue. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I'm having an issue:
Give an expressive description of what is went wrong
Starting an ExpressPeerServer in a server that runs express and socket.io breaks socket.io. Apparently both use the same port and this wrecks havoc, but this used to work with previous versions.
Version of
peer
you're experiencing this issue0.5.3
Nodejs version?
v10
Platform name and its version (Win, Mac, Linux)?
Linux. Also, socket.io 2.3.0.
Nice to have: a repository with code to reproduce the issue
Sorry, don't have
If you're getting an error or exception, please provide its full stack-trace as plain-text or screenshot
There's no error. socket.io starts, but
app.use('/peerjs', peerserverSSL);
breaks socket.io connections.This used to work with
"peerjs-server": "^0.2.9",
but broke after updating to current.Is this a bug or is peerjs now incompatible with socket.io? If incompatible, any suggestions for a workaround? Create a new peerjs server without using express perhaps? Thanks
The text was updated successfully, but these errors were encountered: