1.0.0 • Published 10 months ago
@http-svc/middleware v1.0.0
Http Service 基础中间件
使用方式
派生自定义组件
import { HttpSvcMiddleware } from "@http-svc/middleware"
async function customHanlder(ctx, next) {
...
return await next()
}
class HttpSvcCustomMiddleware extends HttpSvcMiddleware {
name = 'CUSTOM_NAME'
constructor() {
super(customHanlder)
}
}
// 全局注册(参考 http-svc的init文档)
const http = new HttpService([
new HttpSvcCustomMiddleware(customHanlder)
])
1.0.0
10 months ago
1.0.0-rc.4
1 year ago
1.0.0-rc.3
1 year ago
1.0.0-rc.2
2 years ago
1.0.0-rc.1
2 years ago