From 2160dbe4e3116817451e441186a44ab55c229ee1 Mon Sep 17 00:00:00 2001 From: COOL Date: Fri, 19 Jul 2024 16:10:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/config/config.local.ts | 2 ++ src/modules/base/event/app.ts | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) 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}`); + } + /** * 检查配置 */