# nucleic-site

Cloudflare Worker that serves Nucleic's static teaser site on **`nucleic.blakeslee.xyz`**.

It's an [assets-only Worker](https://developers.cloudflare.com/workers/static-assets/) — there is
no `main` script. The page itself lives at repo-root [`website/index.html`](../../website/index.html)
(the source of truth per `NUCLEIC_CONCEPT.md`); `wrangler.jsonc` points `assets.directory` at
`../../website` so the same file is served verbatim.

## Develop

```sh
npm install
npm run check     # wrangler deploy --dry-run — bundles assets, no upload, no auth
npm run dev       # local server at http://localhost:8787
```

## Deploy

Deploying needs Cloudflare auth (`wrangler login`, browser OAuth) **or** a `CLOUDFLARE_API_TOKEN`
env var with Workers Scripts + Workers Routes edit on the `blakeslee.xyz` zone.

```sh
npm install
wrangler login        # one-time, interactive (skip if CLOUDFLARE_API_TOKEN is set)
npm run deploy
```

On first deploy, wrangler provisions the `nucleic.blakeslee.xyz` DNS record and TLS cert
automatically (the `routes` custom domain). The `blakeslee.xyz` zone must be on the account — it
already is; `nucleic-edge` serves `api.` / `relay.` on the same zone.

To publish edits later, just change `website/index.html` and re-run `npm run deploy`.
