feat: 更新静态资源代理文档,优化路由和插件集成,提升代码可读性和功能性
This commit is contained in:
15
docs/examples/base.md
Normal file
15
docs/examples/base.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# 最基本的用法
|
||||
|
||||
```ts
|
||||
import { App } from '@kevisual/router';
|
||||
const app = new App();
|
||||
app.listen(4002);
|
||||
|
||||
app
|
||||
.route({ path: 'demo', key: '02' })
|
||||
.define(async (ctx) => {
|
||||
ctx.body = '02';
|
||||
})
|
||||
.addTo(app);
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user