kotlin-ktor-patterns
Ktor 服务器模式,包括路由 DSL、插件、身份验证、Koin DI、kotlinx.serialization、WebSockets 和 testApplication 测试。
Content Preview
--- name: kotlin-ktor-patterns description: Ktor 服务器模式,包括路由 DSL、插件、身份验证、Koin DI、kotlinx.serialization、WebSockets 和 testApplication 测试。 origin: ECC --- # Ktor 服务器模式 使用 Kotlin 协程构建健壮、可维护的 HTTP 服务器的综合 Ktor 模式。 ## 何时启用 * 构建 Ktor HTTP 服务器 * 配置 Ktor 插件(Auth、CORS、ContentNegotiation、StatusPages) * 使用 Ktor 实现 REST API * 使用 Koin 设置依赖注入 * 使用 testApplication 编写 Ktor 集成测试 * 在 Ktor 中使用 WebSocket ## 应用程序结构 ### 标准 Ktor 项目布局 ```text src/main/kotlin/ ├── com/example/ │ ├── Application.kt # Entr
How to Use
Recommended: Install to project (local)
mkdir -p .claude/skills
curl -o .claude/skills/kotlin-ktor-patterns.md \
https://raw.githubusercontent.com/affaan-m/everything-claude-code/main/docs/zh-CN/skills/kotlin-ktor-patterns/SKILL.mdSkill is scoped to this project only. Add .claude/skills/ to your .gitignoreif you don't want to commit it.
Alternative: Clone full repo
git clone https://github.com/affaan-m/everything-claude-codeThen reference at docs/zh-CN/skills/kotlin-ktor-patterns/SKILL.md
Related Skills
kotlin-coroutines-flows
Kotlin协程与Flow在Android和KMP中的模式——结构化并发、Flow操作符、StateFlow、错误处理和测试。
kotlin-coroutines-flowskotlincoroutinesflows
by affaan-m · everything-claude-code
kotlin-patterns
惯用的Kotlin模式、最佳实践和约定,用于构建健壮、高效且可维护的Kotlin应用程序,包括协程、空安全和DSL构建器。
kotlin-patternskotlinpatterns
by affaan-m · everything-claude-code
kotlin-testing
使用Kotest、MockK、协程测试、基于属性的测试和Kover覆盖率的Kotlin测试模式。遵循TDD方法论和地道的Kotlin实践。
kotlin-testingkotlintestingtdd
by affaan-m · everything-claude-code
kotlin-coroutines-expert
Expert patterns for Kotlin Coroutines and Flow, covering structured concurrency, error handling, and testing.
architecturekotlincoroutines
by sickn33 (Antigravity) · antigravity-awesome-skills