更新 .cnb.yml、package.json 和文档,添加新功能和示例代码
This commit is contained in:
25
AGENTS.md
Normal file
25
AGENTS.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# @kevisual/router
|
||||
|
||||
## 是什么
|
||||
|
||||
`@kevisual/router` 是一个基于自定义的的轻量级路由框架,支持 TypeScript,适用于构建 API 服务。
|
||||
|
||||
## 安装
|
||||
|
||||
```bash
|
||||
npm install @kevisual/router
|
||||
```
|
||||
|
||||
## 快速开始
|
||||
|
||||
```ts
|
||||
import { App } from '@kevisual/router';
|
||||
const app = new App();
|
||||
app.listen(4002);
|
||||
|
||||
app.route({path:'demo', key: '01'})
|
||||
.define(async (ctx) => {
|
||||
ctx.body = '01';
|
||||
})
|
||||
.addTo(app);
|
||||
```
|
||||
Reference in New Issue
Block a user