Cloudflare pages vs workers
Hello I don't really catch the difference between Cloudflare worker and Cloudflare pages...
Cloudflare pages seems to render static pages where Cloudflare workers is a serverless service (for backend stuff, db, ...).
That said if I'd like to deploy a Sveltkit app it will be on Cloudflare pages if I use it only for my frontend and Cloudflare workers (I don't really know how deploy it... do I need both pages and workers adapters https://kit.svelte.dev/docs/adapters) for a backend + frontend app.
5 Replies
No, just use the Pages adapter.
So I can build an entire backend service (with auth....) only by using cloudlfare pages ? What the purpose of cloudflare workers then?
If you don’t need to serve static assets with your project. Workers also offers more triggers than just requests.
@Cyb3r-Jok3 so it sounds like if you're building an API only, you can use workers. But if you're building a full stack app (that'll serve static assets like the js bundle and css), you need to use pages?
Are there any sources I can read about this distinction? Because this was also confusing to me
You don't need to use Pages to serve static assets, it is just free to do so. Please also make your own post rather than reviving old ones.