Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting a PeerServer key

The PeerJS Documentation says

The 'key' we're passing in to the Peer constructor is a PeerServer cloud API key. You can use ours for now, but you should sign up for your own free key.

However, the given link just leads to this page, which doesn't have instructions on how to get a PeerServer key.

So, How do I get a PeerServer Key?

like image 721
Lumin Avatar asked Sep 05 '26 05:09

Lumin


2 Answers

The PeerJS documentation is old. You do not need a PeerServer key anymore (This change is permanent). Just omit the key option -

const peer = new Peer()
like image 132
Lumin Avatar answered Sep 07 '26 18:09

Lumin


This would have saved me three hours if the documentation was more clear. I thought I'd add that you can include an ID for your client and still use the cloud server. let peer = new Peer('clientID'). You only have to exclude the second argument (options) from Peer().

like image 26
Ben Trono Avatar answered Sep 07 '26 18:09

Ben Trono



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!