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
Hello, I’m Allie!
No, just use the Pages adapter.
Pierre 🪴
Pierre 🪴•9mo ago
So I can build an entire backend service (with auth....) only by using cloudlfare pages ? What the purpose of cloudflare workers then?
Cyb3r-Jak3
Cyb3r-Jak3•9mo ago
If you don’t need to serve static assets with your project. Workers also offers more triggers than just requests.
kelbs
kelbs•3mo ago
@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
Cyb3r-Jak3
Cyb3r-Jak3•3mo ago
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.
Want results from more Discord servers?
Add your server
More Posts
Has anybody noticed that Turnstile is being served to Googlebot (IP range whitelisted)?I'm seeing a range of issues pertaining to the Googlebot not being able to access my pages currentlyTransfer to Cloudflare registrar with Cloudflare website does not change nameserversExisting website in Cloudflare. Moved the domain to Cloudflare Registrar, which is asking to change E-mail routing with worker only on subdomainHello, After searching for a bit i found that to make this possible i needed to create a different There are no special instructions for> There are no special instructions for migrating from Wrangler v2 to v3. You should be able to updaChanging a GitHub project to a Direct Upload projectRight now, one of my websites uses the GitHub integration to upload builds, but I want to switch to If the header doesn't include cf-connecting-ip, is it a bot?I'm doing the service through pagesveltekit, but there are often 500 internal server errors. HoweverGetting service bindings to workHi there, I'm trying to get one worker to call another worker. Both workers are on the same account.Looking for advice for a multi-origin siteI have many backends across different datacenters and clouds, I'd like to treat them all as a singleWhat is the best tool that we can use when uses Cloudflare Page where we want visitors can only 50 pWhat is the best tool that we can use when uses Cloudflare Page where we want visitors can only 50 pcompatibility_flags = [ "nodejs_compat" ] not workingI get this message even after adding this flag to the `wrangler.toml` file ``` The package "http" w