peerjs-server | PeerServer helps establishing connections between PeerJS
kandi X-RAY | peerjs-server Summary
kandi X-RAY | peerjs-server Summary
PeerServer helps establishing connections between PeerJS clients. Data is not proxied through the server.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of peerjs-server
peerjs-server Key Features
peerjs-server Examples and Code Snippets
Community Discussions
Trending Discussions on peerjs-server
QUESTION
I'm trying to get a node.js server (using express) working using websockets in elastic beanstalk (EB) using application load balancer (ALB) but without using socket.io (because peerjs-server is the server I'm trying to get running and it's not written with socket.io).
I've seen a couple of articles suggesting you have to use socket.io (or another lib that doesn't just rely on websockets), but Amazon says ALB supports websockets directly.
My server is both a create-react-app server and a peerjs-server. It runs fine in dev on port 9000 for both the web UI and the peerjs ws connections.
I've tried all of the different approaches I've found, but I haven't gotten this to work, and I've even seen things written that suggest it can't be done, but it seems like I'm close. Has anyone gotten this to work, and if so, how?
...ANSWER
Answered 2019-Nov-10 at 23:43Okay, I got it to work. Here's what I've done to get everything working on port 9000.
In EB, create an application, then begin creating an environment.
In the configuration of the environment, go into the Software section and tell it that you're going to use npm run prod
to start your server.:
Now, go into the Load Balancers section and, as shown in the pic below:
- add a listener on port 9000
- create a process on port 9000 and enable stickiness (I called mine peerjsServer)
- add Rules for each URL path you want to use to access the server, and have each of those rules assigned to the process you created (peerjsServer). Also point the default to that process, so that health checks on 80 get through successfully to your server
You may need to hop over to the EC2 dashboard in the AWS UI in order to make sure that the necessary Security Groups are defined there. I think I created the first two on the and the last two were default creations, but I don't recall. Anyway, they need to have port 9000 open for inbound and outbound (port 80 is there by default all the time):
Back to the EB configuration, go to the Instances section and make sure that your instance has the Security Groups assigned to it:
I ran react-scripts build
to make the /build
directory containing the production version of the server UI(this is create-react-apps stuff that I'm not covering here).
In my code, I start the server using a server.js
that makes a server that runs both the peerjs-server ws server and an http server.
QUESTION
I'm unable to make peerjs
connect to my server. I have setup a GAE-app with the peerjs-server running on it. The server is running fine since I can go the the peerjs
endpoint and get the default response ({"name":"PeerJS Server" etc...
).
However, I'm unable to connect to that server from a loca file.
In my file, I have setup the following code:
...ANSWER
Answered 2019-Jun-01 at 04:27If you have access the endpoint with the browser, is that with https:? If so, it's on port 443.
It's quite possible that port gets routed to port 8080 on the docker instance itself (by something like NGINX).
Not sure if you need to open additional ports so that your app can work, or if you can just use port 443 (although it needs to talk over https, which is a different protocol)
QUESTION
I am using PeerJS for audio calling functionality in my project. Their website is down and the cloud servers are no longer working.
The solution I came across is to use peerjs-server library.
I also came across the answer in this question that explains how to use peerjs-server
.
My question is what should I use in path
in the following code:
ANSWER
Answered 2018-Apr-13 at 08:05My question is what should I use in path in the following code
You can find this out yourself by peeking into the code of the repo.
There you can see, that the path
option of PeerServer
will be used as part of an express app, that itself creates a websocket connection:
QUESTION
I'm trying to deploy a PeerJS server on Azure. On my kudu console, running
...ANSWER
Answered 2018-Jan-10 at 04:24This will be a firewall problem... You will need to open port 9000 in your Azure settings panel.
From the machine itself, open up a browser to http://localhost:9000/ or http://localhost:9000/peerjs and you should see the standard Peerjs server JSON output.
Or if you only have command line, try curl http://localhost:9000/
or http://localhost:9000/peerjs
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install peerjs-server
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page