Repository navigation
docs: Cloudflare Workers で WebhookServer を httpServerHandler 経由で使う方法を記載 - #81
Merged
Merged
Conversation
…法を記載 API クライアントと gRPC ストリーミングが Workers で使えない理由も、実測に合わせて書き直した。
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
WebhookServerはcloudflare:nodeのhttpServerHandlerで Workers のfetchにつなげば Cloudflare Workers でも動くことが分かったので、スモークテストで確認するようにし、対応環境とドキュメントを更新した。コードの変更はない。関連 Issue
関連: #76
変更の種類
変更内容
検証
workerd (Wrangler) 上で
WebhookServerを起動し、httpServerHandler({ port })に署名付きのリクエストを渡した。/healthz: 200スモークテストの Workers の
webhookをこの方法で確認するようにし、必須項目にした。API クライアントと gRPC ストリーミングが Workers で使えない理由
あわせて実測で確認した。
application/grpc) だけを受け付ける (gRPC-Web / Connect は 415、HTTP/1.1 は 464)fetchは外部へ HTTP/1.1 で接続するため、mixi2 の API からは 464 が返るnode:http2はconnectが未実装 (The http2.connect method is not implemented)ドキュメント
WebhookServercreateWebhookHandlercreateWebhookHandlerとWebhookServer+httpServerHandlerの使い分けと例)チェックリスト
npm run ci— フォーマットと Lint 通過npm run typecheck— 型チェック通過npm test— テスト全件通過npm run build— ビルド成功 (pages のastro buildも確認済み)