Repository navigation
Host jsonx.fart.tools on a Cloudflare Worker - #36
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves jsonx.fart.tools off Deno Deploy onto a Cloudflare Worker.
deno task generate) into generated/, so no runtime file readsPLAYGROUNDSbinding) on Cloudflare, Deno KV locallyworker.tsruns the Fresh server;_fresh/clientis uploaded as static assets$std/dotenv/load.tsimport (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