diff options
| author | Joe Mou <dev@mou.fo> | 2026-08-11 08:27:26 -0400 |
|---|---|---|
| committer | Joe Mou <dev@mou.fo> | 2026-08-11 08:30:10 -0400 |
| commit | 2b4a69720b53480d82cf296ac5dbe4614d9470b9 (patch) | |
| tree | f1a617c74017951df5c4f5dba7a5e068f813f6a1 /cgithub/CLAUDE.md | |
| parent | 5526d976f645def4caae9fbd2c1d75349029764e (diff) | |
Deploy only to Cloudflare Workers
The Node server entry, esbuild bundle, and Makefile rsync/systemd deploy
are gone; wrangler dev and wrangler deploy are the only paths now, so the
dev:cf/deploy:cf scripts take over the plain dev/deploy names. @hono/
node-server and esbuild drop out with src/index.ts, and the README's
systemd socket and nginx snippets go with them.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'cgithub/CLAUDE.md')
| -rw-r--r-- | cgithub/CLAUDE.md | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/cgithub/CLAUDE.md b/cgithub/CLAUDE.md index 1bf4d88..37774cc 100644 --- a/cgithub/CLAUDE.md +++ b/cgithub/CLAUDE.md @@ -5,33 +5,28 @@ cgithub is a lightweight GitHub alternative frontend that scrapes GitHub's serve ## Commands ```bash -# Development (watch mode with hot reload) +# Local dev server (Cloudflare Workers runtime) pnpm run dev -# Production build (bundles to dist/) -pnpm run build +# Deploy to Cloudflare Workers +pnpm run deploy # Run tests pnpm test - -# Cloudflare Workers: local dev and deploy -pnpm run dev:cf -pnpm run deploy:cf ``` ## Architecture -**Stack:** Hono (web framework) + Eta (templating) + TypeScript, bundled with esbuild +**Stack:** Hono (web framework) + Eta (templating) + TypeScript, running on Cloudflare Workers **Source files:** -- `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/app.ts` - Hono routes - `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). 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). +**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`/`deploy` scripts). -**Static files:** `public/static/*`, served by `@hono/node-server` on Node and by Workers Static Assets on Cloudflare. +**Static files:** `public/static/*`, served by Workers Static Assets. **Routes:** - `GET /:owner` - User or organization profile with pinned repositories |
