Would Cloudflare Websockets work with a Next.js + tRPC project hosted on Pages?
Subscriptions / WebSockets | tRPC
Using Subscriptions
4 Replies
I don't think I'd need to use Durable Objects for my use case
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
can't you use websockets without durable objects?
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 …