Workers Sites vs Pages Functions guidance

Can someone from Cloudflare give some additional guidance regarding the choice? For instance, I would like to use hono and htmx for a SSR app, but I don't really want to use pages and functions. I need to host some static assets however there is a warning on the Workers Sites documentation pages to not use it for new projects and use Pages instead. Will "Worker Sites" be retired? What are the functional differences? (apart from file based routing in Pages). How should I host static assets for use in workers. Should I use Pages Functions in Advanced mode and have a _routes.json file? Thanks in advance for any help:)
3 Replies
Hello, I’m Allie!
Workers Sites can’t really be retired, in the sense that all you need for it to be supported is KV+Workers. It is more like Sites isn’t actively being worked on, so you won’t get the creature comforts of Pages As for how to store your files, there are multiple ways to do so. Sites as you mentioned, manually uploading to KV or R2, or embedding files directly in your Worker Or you can use Pages as you thought about, since static assets with Pages are free. If you do use a _routes.json, then you can exclude the static files from counting toward your Requests
nob
nobOP16mo ago
One question still persists .. I can't use wrangler.toml with pages. Is there another recommended way to keep all your bindings in the same place .vars file or something? I like developing locally, and having to add bindings from the Cloudflare panel is .. well a strange workflow. Thanks
Hello, I’m Allie!
There is Terraform/Pulumi for syncing bindings locally But that doesn’t apply for local dev
Want results from more Discord servers?
Add your server