The best way to control Claude Code, Codex and more from any computer or phone

main
md 36 lines 1.38 KB
Rendered Raw
1 # cloudflare-foldkit-spa
2
3 The counter scaffold from `create-foldkit-app --rendering spa --example counter`.
4 HTML contains an empty app container; `Runtime.run` renders it in the browser.
5 Cloudflare serves the same shell for deep links.
6
7 ## Run on Cloudflare
8
9 From this directory, after installing the workspace dependencies:
10
11 ```sh
12 pnpm dev
13 pnpm deploy
14 pnpm destroy
15 ```
16
17 `pnpm build` runs the standard Vite build. `pnpm test` runs the credentialed
18 Cloudflare integration checks and destroys the example afterward.
19
20 `alchemy.run.ts` uses `Cloudflare.Website.Foldkit`. The application’s Vite plugin
21 supplies the build output and routing metadata; no hand-written Worker wrapper
22 or build identity declaration is required.
23
24 ## Scaffold source
25
26 Application files follow [Foldkit’s generator and examples](https://github.com/foldkit/foldkit/tree/foldkit%400.167.0/examples/counter)
27 (Foldkit 0.167.0 / `create-foldkit-app` 0.39.0). The original files were produced using the
28 generator’s `createProject` function. Alchemy adds the deployment file, workspace
29 package configuration and integration tests.
30
31 ## Rendering examples
32
33 - [SPA / CSR](../cloudflare-foldkit-spa): browser-only counter.
34 - [SSG](../cloudflare-foldkit-ssg): prerendered home and about pages.
35 - [SSR](../cloudflare-foldkit-ssr): cookie-backed request rendering.
36 - [Hybrid](../cloudflare-foldkit-hybrid): prerendered pages and a dynamic counter.