cruhl
cruhl14mo ago

Does anyone have an example of subscriptions implemented in CloudFlare Workers?

I'm trying to use subscriptions via WebSocket in CloudFlare Workers, but it's been a real pain so far. Looking for any advice, thanks in advance!
6 Replies
BeBoRE
BeBoRE14mo ago
There is currently no adapter for CloudFlare Workers subscriptions, you'd have to implement one yourself
cruhl
cruhlOP14mo ago
Yep, finally got it working, wasn't too bad, but still need to implement the hibernation API
BeBoRE
BeBoRE14mo ago
Oh, sick. Would you like to share your implementation?
brumbrum_brum
brumbrum_brum7mo ago
Hey, would you be able to share the adapter?
dandoen
dandoen5mo ago
Same.. @cruhl any chance you'd be willing to share the high level?
dandoen
dandoen5mo ago
GitHub
GitHub - cruhl/cloudflare-trpc-subscriptions-example
Contribute to cruhl/cloudflare-trpc-subscriptions-example development by creating an account on GitHub.

Did you find this page helpful?