Add a guide for Next.js route handlers, Hono and other fetch-based runtimes
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Documentación
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- bun, deno, next.js, typescript
- Área
- documentation
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 13
- Forks
- 7
- Merge medio
- 3 h 41 min
- PR fusionados (30 d)
- 155
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de codercops/chatcops
-
Document the pre-chat formPosiblemente ocupada @masyarakatai la tomó hace 5 días. Abiertodocumentation good first issue hacktoberfest widget
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
codercops/chatcops#70 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
docs: update the providers page for openai-compatible, registerProvider and provider importsPosiblemente ocupada @prakashNalla la tomó hoy. Abiertodocumentation good first issue hacktoberfest website
Dificultad 3/5 1-2 días Aptitud para principiantes 76/100
codercops/chatcops#291 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
docs: add a protocol reference page for custom clientsPosiblemente ocupada @kachamsiddarth la tomó hoy. Abiertodocumentation good first issue hacktoberfest website
codercops/chatcops#286 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Create @chatcops/store-cloudflare (D1, KV and a Durable Object counter)Posiblemente ocupada @bhushan4work la tomó hoy. Abiertoenhancement hacktoberfest help wanted server
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
codercops/chatcops#249 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Create @chatcops/store-sqlite, a store for single-server setupsPosiblemente ocupada @srikar-naidu la tomó hoy. Abiertoenhancement hacktoberfest help wanted server
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
codercops/chatcops#247 · 3 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de codercops/chatcops
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
phivk/rubiks-lab#33 ·
Los mantenedores suelen responder en 1 día
-
BUG:Edit Album strips spaces from the password so albums with a leading/trailing space in the password can't be editedPosiblemente ocupada @ManyaJain111 la tomó hoy. Abiertobug enhancement possible-duplicate
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
AOSSIE-Org/PictoPy#1637 · 4 comentarios ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
chaitin/MonkeyCode#1437 ·
Los mantenedores suelen responder en 1 día
-
rtdb-info-connected-order test: unhandled 'connection is closed' rejection fails the CLI suiteAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
area:cards enhancement migration ready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
fil-donadoni/tolaria#6309 ·
Los mantenedores suelen responder en 1 día