t3-code-android-nightly/.repos/alchemy-effect/examples/cloudflare-website-vocs
Julius Marminge 6f9cea00ae
chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 13:22:30 -07:00
..
public chore(refs): sync Alchemy reference to beta.76 (#10654) 2026-09-07 21:54:45 -07:00
src chore(refs): sync Effect and Alchemy references to rc.115 and beta.78 (#12327) 2026-09-17 23:21:25 -07:00
test chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
alchemy.run.ts chore(refs): sync Alchemy reference to beta.76 (#10654) 2026-09-07 21:54:45 -07:00
package.json chore(refs): sync Effect and Alchemy references to rc.115 and beta.78 (#12327) 2026-09-17 23:21:25 -07:00
README.md chore(refs): sync Effect and Alchemy references to rc.115 and beta.78 (#12327) 2026-09-17 23:21:25 -07:00
tsconfig.json chore(refs): sync Alchemy reference to beta.76 (#10654) 2026-09-07 21:54:45 -07:00
vocs.config.ts chore(refs): sync Alchemy reference to beta.76 (#10654) 2026-09-07 21:54:45 -07:00

Cloudflare Website: Vocs

Deploys a Vocs documentation site to Cloudflare Workers with Cloudflare.Website.Vocs—no Vocs adapter or Wrangler configuration.

The resource runs Vocs' Waku/RSC build, deploys the server runtime as a Worker, and publishes prerendered pages, generated files such as llms.txt, and the contents of public/ as static assets.

const site = yield* Cloudflare.Website.Vocs("VocsDocs");

Commands

bun run dev      # start Vocs' development server in workerd
bun run deploy   # build and deploy the documentation site
bun run destroy  # tear down the Worker and assets

Project structure

  • vocs.config.ts is loaded natively by Vocs.
  • src/pages/*.mdx contains the documentation pages.
  • src/components/Counter.tsx demonstrates an interactive client component.
  • public/hello.txt demonstrates static passthrough assets.
  • alchemy.run.ts declares the Cloudflare.Website.Vocs resource.

Notes

  • @alchemy.run/frontend-frameworks must be installed in the project; the source provider is loaded from its /vocs exports at deploy time.
  • Node.js compatibility is enabled by the Worker's compatibility date.
  • Project inputs are content-hashed, respecting .gitignore by default, so unchanged projects skip the build and deployment.
  • When vocs.config.ts uses a custom outDir, pass the same value as the resource's outDir property.