hile-http
Installation
SKILL.md
@hile/http SKILL
本文档用于规范 AI 与开发者在 @hile/http 中的实现方式,确保控制器形式、路由加载与服务生命周期管理一致。
1. 架构概览
@hile/http 由四部分组成:
Http:封装 Koa 与路由器,负责中间件、路由注册与服务启停defineController:将方法、可选中间件与处理函数封装为标准控制器defineResponsePlugin:注册控制器结果的后处理插件链Loader:支持手动编译路由与按文件系统自动加载,并提供冲突策略与冲突回调
典型流程:定义控制器 → 加载路由 → 启动服务。
2. 关键类型
import type { Context, Middleware } from 'koa'
Related skills
More from cevio/hile
hile-core
@hile/core 的代码生成与使用规范。适用于定义/加载 Hile 服务、生命周期编排、依赖图与容器事件相关场景。
20hile-cli
@hile/cli 的强约束生成规范。适用于 boot 编排、启动流程、容器事件日志与退出阶段管理。
18hile-typeorm
@hile/typeorm 的代码生成与使用规范。适用于 DataSource 服务加载、transaction 事务封装、及与 @hile/core/@hile/cli 集成场景。
18hile-ioredis
@hile/ioredis 的代码生成与使用规范。适用于 Redis 服务加载、环境变量配置、及与 @hile/core/@hile/cli 集成场景。
17hile-monorepo
引导 AI 在本仓库或使用 Hile 的项目中,正确选用并遵守各 Hile 模块的约束与用法。编辑/生成涉及 @hile/* 或 create-hile 的代码时必读。凡依赖 @hile/http-next 的应用须同时严格遵守 packages/http-next/SKILL.md 全文,不得选择性遵守。
9message-loader
Code generation and contribution rules for @hile/message-loader. Use when editing this package or when the user asks about @hile/message-loader patterns or API.
1