Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

クローズ
#72 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
78/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
bun, deno, next.js, typescript
領域
documentation

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
13
フォーク
7
平均マージ
3時間 33分
マージ済み PR(30日)
176

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

codercops/chatcops のほかの issue

codercops/chatcops の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。