Add a guide for Next.js route handlers, Hono and other fetch-based runtimes
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 78/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- bun, deno, next.js, typescript
調査の方向性
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 の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 13
- フォーク
- 7
- 平均マージ
- 3時間 33分
- マージ済み PR(30日)
- 176
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
codercops/chatcops のほかの issue
-
Add startup checks that catch weak or leaked security settings対応中かも @varun-pahuja が 2 日前に担当しました。 オープンenhancement good first issue hacktoberfest server
codercops/chatcops#231 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Type-check the TypeScript samples in the docs対応中かも @An16og が 2 日前に担当しました。 オープンdocumentation hacktoberfest help wanted testing
難易度 4/5 3〜5日 初心者へのやさしさ 70/100
codercops/chatcops#201 · コメント 7 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
hacktoberfest
難易度 1/5 1時間未満 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
Add built-in translations to the widget対応中かも @piyusshhjangid が 1 日前に担当しました。 オープンhelp wanted widget
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
codercops/chatcops#55 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
codercops/chatcops の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
db-ux-design-system/core-web#8613 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug:new
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
callstackincubator/simlock#934 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
gchq/LD-Explorer#286 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
foxglove/mcap#1907 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信