Skip to content

Host jsonx.fart.tools on a Cloudflare Worker - #36

Merged
EthanThatOneKid merged 2 commits into
mainfrom
cloudflare-worker
Nov 17, 2026
Merged

EthanThatOneKid merged 2 commits into
mainfrom
cloudflare-worker

Conversation

@EthanThatOneKid

Copy link
Copy Markdown
Contributor

Moves jsonx.fart.tools off Deno Deploy onto a Cloudflare Worker.

  • docs/ and examples/ are rendered at build time (deno task generate) into generated/, so no runtime file reads
  • saved playgrounds go through a small KV adapter: Workers KV (PLAYGROUNDS binding) on Cloudflare, Deno KV locally
  • worker.ts runs the Fresh server; _fresh/client is uploaded as static assets
  • removed the unused $std/dotenv/load.ts import (it read files at startup)

Verified with wrangler dev: /, /getting-started, /concepts, /api/meta, /api/examples/, /p, /p/example:, static assets all 200; saving a playground via POST /api/playgrounds and loading it at /p/:id round-trips through KV; a missing playground 404s. Unknown doc paths return 500, same as production today (existing bug, not changed here).

Playgrounds saved on the old Deno KV were not migrated.

🤖 Generated with Claude Code

EthanThatOneKid and others added 2 commits November 16, 2026 23:06
Render the docs and examples into generated/ at build time so the server
needs no file system, put saved playgrounds behind a small KV adapter backed
by Workers KV (Deno KV is still used when running locally under Deno), drop
the unused .env loader, and add a Worker entrypoint, wrangler config and a
CI build step.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@EthanThatOneKid
EthanThatOneKid merged commit 34c19b6 into main Nov 17, 2026
2 checks passed
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