UNPKG

koa-typescript-sequlize-swagger

Version:

nodejs的后端模板,使用了koa,typescript,koa-swagger-decorator,zod等

11 lines (8 loc) 198 B
export default () => async (ctx, next) => { console.log('ctx',ctx) try { await next() } catch (error: any) { ctx.body = { msg: error?.message, stack: error?.stack } } };