Best way to go about building an spa -> durable object connection

the static spa can be hosted on a CDN (take cf pages for example), but to talk with a DO we need a cf worker as a proxy.

I'm already using a meta-framework (tanstack-start), so should I just host my whole app (static + API + DO) on one worker? will the hosting quality be on parity?

or do I have the API on a separate worker on a different sub-domain

tldr;
1. Single Worker handling BOTH static + API + Durable Objects
vs
2. cf Pages (static) + Worker (API + Durable Objects)
Was this page helpful?