Solar Notes

thoughts on code, craft, and curiosity

Shipping a static site on Workers

The goal is simple: put some HTML on the internet, fast, with as little ceremony as possible. The recipe is: write static files, write a small Worker entrypoint, configure assets, deploy.

A minimal worker looks like a single default export with a fetch handler that delegates to env.ASSETS.fetch. That is enough to serve a directory of static files, route requests, and keep the deployment footprint small.

Local dev is the part worth getting right. Run the worker locally with the same compatibility date you plan to deploy with. Test signed-out behavior, assets, and routes before you upload anything. A successful build is necessary but not sufficient; a real HTTP round-trip through the preview is what proves the thing works.

Comments

comment(s)

Comments are public and anonymous by default.

About

Solar Notes is a small personal blog maintained by a developer who likes tools that stay out of the way. It is updated when there is something worth saying.

Subscribe

No newsletter yet. If that changes, it will be easy to unsubscribe from.