koa router decorator:用于koa router的@route装饰器 源码
Koa装饰器 用于koa-router的@route装饰器 利用 安装方式: npm i koa-decorator 然后在代码中使用: import { HttpMethod , route } from 'koa-decorator' ; @ route ( '/monitor' ) export default class MonitorCtrl { @ route ( '/alive' , HttpMethod . GET ) async alive ( ctx ) { ctx . body = { data : true , } ; }
下载地址
用户评论