Publish a website · Exercise 03

Deploy

Publish your site on Cloudflare, at a workers.dev URL you can share, and learn which requests run your Worker.

Deploy

Your site works on your machine. Now it goes on the internet, at a *.workers.dev URL anyone can visit.

What you’ll build

Your site, live on Cloudflare’s network as a Worker, with its files served as static assets. Then you’ll change something, deploy again, and see the change live.

Which requests run your Worker

When a request matches a file, like a page you built ahead of time, a stylesheet, or an image, Cloudflare serves it straight from its network, close to the visitor, without running any of your code. Those requests are free and unlimited (billing and limitations).

Everything else runs your Worker: pages it renders on each request, API routes, and paths that don’t match a file. Only those count toward Workers pricing, and the free plan includes 100,000 a day.

Why it matters

Your site’s files and its code deploy together, as one Worker. There’s no separate server to keep running, nothing to keep in sync, and a small site can stay on the free plan.

Prerequisites

  • You’ve completed Build locally and still have that project on disk.