chore: node 16

This commit is contained in:
xiaojunnuo
2023-05-26 14:31:37 +08:00
parent 71a289b009
commit 7b9d70e093
3 changed files with 12 additions and 5 deletions
@@ -15,6 +15,7 @@ import { PreviewMiddleware } from './middleware/preview';
import { AuthorityMiddleware } from './middleware/authority';
import * as staticFile from '@midwayjs/static-file';
import * as cron from './plugins/cron';
import { logger } from './utils/logger';
@Configuration({
imports: [koa, orm, cache, flyway, validateComp, cron, staticFile],
@@ -46,6 +47,11 @@ export class ContainerLifeCycle {
//this.app.use(bodyParser());
//请求日志打印
setTimeout(() => {
console.log('heart beat ');
logger.info('heart beat');
}, 5000);
this.app.useMiddleware([
ReportMiddleware,
//统一异常处理