kotlin-ktor-patterns
Ktor サーバーパターン(ルーティング DSL、プラグイン、認証、Koin DI、kotlinx.serialization、WebSocket、testApplication テストを含む)。
Original · translation did not pass checksTarget: Target not categorized. Automatically collected · unverified.
Excerpt from the author’s documentation
Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.
Read the original Japanese text
Topics in the source
- Ktor サーバーパターン
- アクティベートするタイミング
- アプリケーション構造
- 標準的な Ktor プロジェクトレイアウト
- アプリケーションエントリーポイント
- ルーティング DSL
- 基本ルート
- 認証ルートを使用したルート整理
Kotlin コルーチンで堅牢かつ保守性の高い HTTP サーバーを構築するための包括的な Ktor パターン。 Ktor HTTP サーバーの構築 Ktor プラグインの設定(Auth、CORS、ContentNegotiation、StatusPages) Ktor を使用した REST API の実装 Koin を使用した依存性注入の設定 testApplication を使用した Ktor インテグレーションテストの作成 Ktor での WebSocket の使用 | パターン | 説明 | |---------|------| | route("/path") { get { } } | DSL を使用したルートグループ化 | | call.receive () | リクエストボディのデシリアライズ | | call.respond(status, body) | ステータス付きレスポンスの送信 | | call.parameters["id"] | パスパラメーターの読み取り | | call.request.queryParameters["q"] | クエリパラメーターの読み取り | | install(Plugin) { } | プラグインのインストールと設定 | | authenticate("name") { } | 認証でルートを保護 | | by inject () | Koin 依存性注入 | | testApplication { } | インテグレーションテスト | 覚えておくこと: Ktor は Kotlin コルーチンと DSL を中心に設計されています。ルートをシンプルに保ち、ロジックはサービスに移し、依存性注入には Koin を使用してください。完全なインテグレーションカバレッジのために testApplication でテストしてください。
- Source repository
- affaan-m/ECC
- Source file
- docs/ja-JP/skills/kotlin-ktor-patterns/SKILL.md
- Fixed revision
- d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
Sources and evidence
This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.
Author: affaan-m/ECC · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T14:01:49.383Z.
Categories are inferred from names, descriptions and paths. They do not establish compatibility.
License and attribution
MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.
Original license ↗Synchronization, copying and user-reported success do not mark a resource as runtime-tested.
Limitations and notes
- Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.