Skip to content

Deploy as a Cloudflare Worker with static assets - #5

Merged
HapticHash merged 1 commit into
masterfrom
claude/capabilities-discussion-hrjot1
Sep 24, 2026
Merged

HapticHash merged 1 commit into
masterfrom
claude/capabilities-discussion-hrjot1

Conversation

@HapticHash

Copy link
Copy Markdown
Owner

The Cloudflare project runs Workers Builds (wrangler versions upload), but wrangler.toml used the Pages-only pages_build_output_dir key, so the deploy failed with "Missing entry-point to Worker script or to assets directory". Workers also don't run Pages Functions in functions/.

  • wrangler.toml: add main and an [assets] block serving ./dist with SPA fallback; run_worker_first routes /api/* to the Worker
  • Move the API from functions/api/* to worker/ with a small router
  • Add wrangler as a dev dependency so builds use a pinned version
  • Update README deployment instructions

Claude-Session: https://claude.ai/code/session_011UUBS4XF57trCnZcGwBu35

The Cloudflare project runs Workers Builds (`wrangler versions upload`),
but wrangler.toml used the Pages-only `pages_build_output_dir` key, so the
deploy failed with "Missing entry-point to Worker script or to assets
directory". Workers also don't run Pages Functions in `functions/`.

- wrangler.toml: add `main` and an `[assets]` block serving ./dist with SPA
  fallback; `run_worker_first` routes /api/* to the Worker
- Move the API from functions/api/* to worker/ with a small router
- Add wrangler as a dev dependency so builds use a pinned version
- Update README deployment instructions

Claude-Session: https://claude.ai/code/session_011UUBS4XF57trCnZcGwBu35
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
compressly 43fd690 Commit Preview URL

Branch Preview URL
Sep 24 2026, 10:57 PM

@HapticHash
HapticHash merged commit 6feed1f into master Sep 24, 2026
3 checks passed
@HapticHash
HapticHash deleted the claude/capabilities-discussion-hrjot1 branch September 24, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant