release: promote develop → main (staging) #5

Merged
chrnx merged 164 commits from develop into main 2026-07-18 19:01:55 +00:00
2 changed files with 31 additions and 0 deletions
Showing only changes of commit 1fee7de543 - Show all commits

No files matched your search

+1
View File
@@ -41,6 +41,7 @@ export default defineConfig({
{ label: 'Plugins & observability', slug: 'guides/plugins' },
{ label: 'Graph introspection', slug: 'guides/introspection' },
{ label: 'OpenAPI', slug: 'guides/openapi' },
{ label: 'Runtimes', slug: 'guides/runtimes' },
{ label: 'Testing', slug: 'guides/testing' },
{ label: 'Mesh (alpha)', slug: 'guides/mesh', badge: { text: 'alpha', variant: 'caution' } },
],
@@ -0,0 +1,30 @@
---
title: Runtimes (Node, Deno, Bun, edge)
description: "Run Green Tea anywhere with app.fetch — the Web-Standards handler."
---
Green Tea exposes a Web-Standards handler, `app.fetch(request): Promise<Response>`, so the
same app runs on any runtime that speaks the Fetch API — for **HTTP and SSE** today.
```ts
const app = createApp({ modules: [ApiModule] });
// Node (native listener, TLS, timeouts)
app.listen(3000);
// Deno
Deno.serve(app.fetch);
// Bun
Bun.serve({ fetch: app.fetch });
// Cloudflare / edge
export default { fetch: app.fetch };
```
**Node is the reference implementation** — every runtime returns the same status, headers,
and body for the same request (enforced by a parity test suite).
**Not yet on non-Node runtimes:** WebSocket (`@Ws`) and mesh — Node-only for now; cross-runtime
WebSocket is on the roadmap. `app.listen()` and TLS are Node-only; on Deno/Bun/edge you get
`app.fetch`.