peers / peerjs-server

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

Deploying peerjs server #422

Open ranile opened 1 year ago

ranile commented 1 year ago

I would like to deploy the server on the edge/serverless environment. Can it be done? Ideally, I would like to have NextJS route that act as peerjs server, but I could also do with running it separately on Vercel or Cloudflare

How may I do so?

IB1899 commented 12 months ago

Have you solved the problem because I am facing the same thing

jonasgloning commented 12 months ago

Currently, there is no way to host (all of) PeerServer on a serverless platform. The primary issue is enabling two edge functions to communicate and share peer details.

If you know of an affordable and straightforward solution to this problem, we could build a basic implementation in a few days.

jonasgloning commented 11 months ago

Here is a very quick draft of a PeerServer implementation using Cloudflare Workers: https://github.com/peers/server-cf-worker. It has passed the browser test suite, but has not undergone any additional testing.

Please give it a try!

dallen4 commented 11 months ago

Was just exploring refactoring this for Cloudflare Workers! Will definitely tinker.