Set up pnpm workspaces with three packages: a shared Zod-schema package, a Hono-based API exported as a library, and a Vite/React/ Tailwind frontend that mounts the API via Cloudflare Pages Functions. Storage is abstracted behind an S3-compatible provider so the project can migrate from R2 to a self-hosted MinIO without code changes. https://claude.ai/code/session_01TPBqgcSJMppgrpiq7fLywL
8 lines
214 B
TypeScript
8 lines
214 B
TypeScript
import { createApp } from '@leetete/api';
|
|
import type { AppEnv } from '@leetete/api/env';
|
|
|
|
const app = createApp();
|
|
|
|
export const onRequest: PagesFunction<AppEnv> = (ctx) =>
|
|
app.fetch(ctx.request, ctx.env, ctx);
|