Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Add a guide for Next.js route handlers, Hono and other fetch-based runtimes

Cerrado
#72 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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

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

documentation hacktoberfest help wanted server

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.ts
  • website/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.ts exporting both POST and OPTIONS
    • Hono: app.all(...) or app.on(['POST', 'OPTIONS'], ...), passing c.req.raw
    • Bun (Bun.serve) and Deno (Deno.serve)
  • Each example creates the handler once at module level, not per request
  • A note that rate limiting uses the first x-forwarded-for IP. 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.mdx also exports OPTIONS
  • You've tested each example locally with a placeholder API key such as 'test': an OPTIONS request returns 204 with the CORS headers, and a POST with a broken JSON body returns 400
  • pnpm --filter @chatcops/website build succeeds
  • 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

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de codercops/chatcops

Todos los issues de codercops/chatcops

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.