Would Cloudflare Websockets work with a Next.js + tRPC project hosted on Pages?

4 Replies
atgctg
atgctgOP17mo ago
I don't think I'd need to use Durable Objects for my use case
Bobby Donchev
Bobby Donchev17mo ago
you'll need to host the tRPC server somewhere if you want to use their subscriptions / websockets or you can do it with durable objects
atgctg
atgctgOP17mo ago
can't you use websockets without durable objects?
Bobby Donchev
Bobby Donchev17mo ago
you can. If you dont need coordination among websockets you can do this from the worker: https://developers.cloudflare.com/workers/runtime-apis/websockets/use-websockets/
Use WebSockets · Cloudflare Workers docs
WebSockets allow you to communicate in real time with your Cloudflare Workers serverless functions. In this guide, you will learn the basics of …
Want results from more Discord servers?
Add your server