'use strict' class Api { constructor() { } async get(ctx) { ctx.ok([ ctx.method, ctx.path, ctx.routepath, ctx.param ]) } __mid() { return [ { middleware: async (ctx, next) => { console.log(`api ${ctx.method} start`) await next(ctx) console.log(`api ${ctx.method} end`) } } ] } } module.exports = Api