diff --git a/package.json b/package.json index 1478516..99a1e93 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "一个项目用COOL就够了", "private": true, "dependencies": { - "@cool-midway/core": "^7.1.19", + "@cool-midway/core": "^7.1.20", "@cool-midway/rpc": "^7.0.0", "@cool-midway/task": "^7.0.0", "@midwayjs/bootstrap": "^3.16.0", diff --git a/src/config/config.local.ts b/src/config/config.local.ts index 4a47c8e..862721b 100644 --- a/src/config/config.local.ts +++ b/src/config/config.local.ts @@ -32,6 +32,8 @@ export default { eps: true, // 是否自动导入模块数据库 initDB: true, + // 判断是否初始化的方式 + initJudge: 'db', // 是否自动导入模块菜单 initMenu: true, } as CoolConfig, diff --git a/src/modules/base/event/app.ts b/src/modules/base/event/app.ts index 91b58ee..508b79b 100644 --- a/src/modules/base/event/app.ts +++ b/src/modules/base/event/app.ts @@ -32,6 +32,11 @@ export class BaseAppEvent { this.checkKeys(); } + @Event('onServerReady') + async onServerReady() { + this.coreLogger.info(`服务启动成功,端口:${this.port}`); + } + /** * 检查配置 */