diff options
Diffstat (limited to 'cgithub/CLAUDE.md')
| -rw-r--r-- | cgithub/CLAUDE.md | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/cgithub/CLAUDE.md b/cgithub/CLAUDE.md index 827cc3b..1bf4d88 100644 --- a/cgithub/CLAUDE.md +++ b/cgithub/CLAUDE.md @@ -13,6 +13,10 @@ pnpm run build # Run tests pnpm test + +# Cloudflare Workers: local dev and deploy +pnpm run dev:cf +pnpm run deploy:cf ``` ## Architecture @@ -20,10 +24,14 @@ pnpm test **Stack:** Hono (web framework) + Eta (templating) + TypeScript, bundled with esbuild **Source files:** -- `src/index.ts` - Hono routes and server setup (supports systemd socket activation via `LISTEN_FDS=1`) +- `src/app.ts` - Hono routes, shared by both entry points +- `src/index.ts` - Node server entry (supports systemd socket activation via `LISTEN_FDS=1`) +- `src/worker.ts` - Cloudflare Workers entry (config in `wrangler.jsonc`) - `src/scraper.ts` - GitHub HTML fetching and JSON extraction logic -**Templates:** `views/*.eta` - Eta templates with layout inheritance (`layout.eta` as base) +**Templates:** `views/*.eta` - Eta templates with layout inheritance (`layout.eta` as base). On Workers, runtime code generation is disallowed, so `scripts/compile-views.ts` precompiles templates to `src/views.generated.ts` (gitignored, regenerated by the `dev:cf`/`deploy:cf` scripts). + +**Static files:** `public/static/*`, served by `@hono/node-server` on Node and by Workers Static Assets on Cloudflare. **Routes:** - `GET /:owner` - User or organization profile with pinned repositories |
