The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | // An ordinary nitro API route. `event.context.cloudflare` is the |
| 2 | // cloudflare_module preset's runtime contract: `{ request, env, context }` |
| 3 | // plus `event.context.cf` (the request's cf object). |
| 4 | export default defineEventHandler((event) => { |
| 5 | const env = event.context.cloudflare?.env as Record<string, unknown> | undefined; |
| 6 | return { |
| 7 | greeting: typeof env?.GREETING === "string" ? env.GREETING : null, |
| 8 | }; |
| 9 | }); |