Cloudflare Workers are Cloudflare's serverless environment for JS and WebAssembly languages. They allow you to deploy applications on Cloudflare's edge endpoints (100+ across the globe).
We use Cloudflare Workers to deploy our SPAs as well and programmatically split traffic (proxy/routing) between our frontends and API backends.
The blog post below is an end to end guide on how to do this:
https://www.keypup.io/blog/deploy-spas-and-programmatically-manage-traffic-with-cloudflare-workers
Any question or feedback, feel free to reply!
Hi @alachaum, thank you for sharing this article here.
I was wondering, how can I make it work if I have my site hosted on firebase and want to use CF Workers. Can they be integrated in the current setup or I have to deploy my SPA on CF only. If I deploy my SPA on CF then I would loose my stripe integration and have to code it myself.