Skip to content

Commit

Permalink
修改数据库初始化方式
Browse files Browse the repository at this point in the history
  • Loading branch information
COOL committed Jul 19, 2024
1 parent da27dfa commit 2160dbe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions src/config/config.local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export default {
eps: true,
// 是否自动导入模块数据库
initDB: true,
// 判断是否初始化的方式
initJudge: 'db',
// 是否自动导入模块菜单
initMenu: true,
} as CoolConfig,
Expand Down
5 changes: 5 additions & 0 deletions src/modules/base/event/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ export class BaseAppEvent {
this.checkKeys();
}

@Event('onServerReady')
async onServerReady() {
this.coreLogger.info(`服务启动成功,端口:${this.port}`);
}

/**
* 检查配置
*/
Expand Down

0 comments on commit 2160dbe

Please sign in to comment.