Add a guide for Next.js route handlers, Hono and other fetch-based runtimes
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 78/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- bun, deno, next.js, typescript
- Ambito
- documentation
Direzione di ricerca
Read packages/server/src/adapters/vercel.ts and the Next.js Integration in website/src/content/docs/examples/vercel-full.mdx, then review website/src/content/docs/server/ and the sidebar in website/astro.config.mjs for conventions. Add a Server guide covering the listed Fetch API runtimes and update the existing Next.js snippet. Test the examples with the specified requests and run pnpm --filter @chatcops/website build; done means the examples and sidebar are updated and the build succeeds.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
chatcopsVercelHandler is a plain (request: Request) => Promise<Response> function, so it works in any runtime built on the Fetch API: Next.js App Router route handlers, Hono, Bun and Deno. We don't have a guide for these. The one Next.js snippet we have (in the Vercel full example) only exports POST. The handler answers CORS preflight on OPTIONS, so a widget on another origin needs OPTIONS routed to it too. This is the same kind of problem as #40, which covered Express and is fixed now.
Where to look
packages/server/src/adapters/vercel.tswebsite/src/content/docs/examples/vercel-full.mdx("Next.js Integration")website/src/content/docs/server/(existing adapter pages, to match the style)website/astro.config.mjs(sidebar)
Acceptance criteria
- New page, e.g.
website/src/content/docs/server/fetch-runtimes.mdx, in the Server section of the sidebar - Examples for:
- Next.js App Router:
app/api/chat/route.tsexporting bothPOSTandOPTIONS - Hono:
app.all(...)orapp.on(['POST', 'OPTIONS'], ...), passingc.req.raw - Bun (
Bun.serve) and Deno (Deno.serve)
- Next.js App Router:
- Each example creates the handler once at module level, not per request
- A note that rate limiting uses the first
x-forwarded-forIP. When that header is missing (common when running Bun or Deno directly), all requests share one"unknown"key, so put a proxy in front or set the header. - The Next.js snippet in
vercel-full.mdxalso exportsOPTIONS - You've tested each example locally with a placeholder API key such as
'test': anOPTIONSrequest returns 204 with the CORS headers, and aPOSTwith a broken JSON body returns 400 -
pnpm --filter @chatcops/website buildsucceeds - Docs only, no changeset needed
Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off dev, and open your PR against dev with Closes #<this issue number>. Setup notes (pnpm, build before test) are in CONTRIBUTING.md.
- Lingua principale
- TypeScript
- Stelle
- 13
- Fork
- 7
- Merge medio
- 4h 11m
- PR unite (30g)
- 122
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di codercops/chatcops
-
enhancement hacktoberfest help wanted server
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Document the pre-chat formForse già presa @masyarakatai l’ha presa 4 giorni fa. Apertadocumentation good first issue hacktoberfest widget
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
codercops/chatcops#70 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement hacktoberfest help wanted server
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
Create @chatcops/store-redis for Upstash and other Redis clientsForse già presa @bhushan4work l’ha presa oggi. Apertaenhancement hacktoberfest help wanted server
codercops/chatcops#248 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement hacktoberfest help wanted server
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di codercops/chatcops
Issue simili
-
Edit: Tele Posadas HDApertacheck:passed streams:edit
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
area:mcp bug has repro platform:vscode regression
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
anthropics/claude-code#103970 ·
I maintainer di solito rispondono entro 1 giorno
-
skillopt: success-reflect prompt omits the edit schema, so every success-only edit is droppedAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Workspace secrets/constants containing "$" are corrupted when resolved in data source optionsApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
sdk-typescript: unquoted COPY globs in shell form are silently dropped from the image build contextApertabug javascript
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno