修改启动方式为midway最新

This commit is contained in:
cool 2024-05-06 15:53:52 +08:00
parent 3b131a5c7c
commit 94e6ff57a6
3 changed files with 19 additions and 14 deletions

View File

@ -11,18 +11,18 @@
"@midwayjs/cache-manager": "^3.15.8",
"@midwayjs/core": "^3.15.8",
"@midwayjs/cron": "^3.15.9",
"@midwayjs/cross-domain": "^3.15.10",
"@midwayjs/cross-domain": "^3.15.11",
"@midwayjs/decorator": "^3.15.8",
"@midwayjs/info": "^3.15.10",
"@midwayjs/koa": "^3.15.10",
"@midwayjs/info": "^3.15.11",
"@midwayjs/koa": "^3.15.11",
"@midwayjs/logger": "^3.4.0",
"@midwayjs/static-file": "^3.15.10",
"@midwayjs/static-file": "^3.15.11",
"@midwayjs/typeorm": "^3.15.8",
"@midwayjs/upload": "^3.15.10",
"@midwayjs/validate": "^3.15.10",
"@midwayjs/view-ejs": "^3.15.10",
"@midwayjs/upload": "^3.15.11",
"@midwayjs/validate": "^3.15.11",
"@midwayjs/view-ejs": "^3.15.11",
"axios": "^1.6.8",
"cache-manager-ioredis-yet": "^2.0.3",
"cache-manager-ioredis-yet": "^2.0.4",
"decompress": "^4.2.1",
"download": "^8.0.0",
"ipip-ipdb": "^0.6.0",
@ -36,10 +36,9 @@
"svg2png-wasm": "^1.4.1",
"typeorm": "^0.3.20",
"uuid": "^9.0.1",
"ws": "^8.16.0"
"ws": "^8.17.0"
},
"devDependencies": {
"@midwayjs/cli": "^2.1.1",
"@midwayjs/mock": "^3.15.8",
"@types/jest": "^29.5.12",
"@types/koa": "^2.15.0",
@ -47,7 +46,7 @@
"cross-env": "^7.0.3",
"jest": "^29.7.0",
"mwts": "^1.3.0",
"mwtsc": "^1.7.2",
"mwtsc": "^1.8.1",
"ts-jest": "^29.1.2",
"typescript": "~5.4.5"
},
@ -56,12 +55,12 @@
},
"scripts": {
"start": "NODE_ENV=production node ./bootstrap.js",
"dev": "cross-env && cross-env NODE_ENV=local TS_NODE_TYPE_CHECK=false TS_NODE_TRANSPILE_ONLY=true midway-bin dev --ts",
"cov": "midway-bin cov --ts",
"dev": "cross-env NODE_ENV=local mwtsc --watch --run @midwayjs/mock/app.js",
"cov": "jest --coverage",
"lint": "mwts check",
"lint:fix": "mwts fix",
"ci": "npm run cov",
"build": "midway-bin build -c",
"build": "mwtsc --cleanOutDir",
"pm2:start": "pm2 start ./bootstrap.js -i max --name cool-admin",
"pm2:stop": "pm2 stop cool-admin & pm2 delete cool-admin"
},

View File

@ -42,6 +42,8 @@ export class BaseAppEvent {
setTimeout(() => {
const filePath = path.join(
this.app.getBaseDir(),
'..',
'src',
'modules',
'base',
'config.ts'
@ -72,6 +74,8 @@ export class BaseAppEvent {
setTimeout(() => {
const filePath = path.join(
this.app.getBaseDir(),
'..',
'src',
'config',
'config.default.ts'
);

View File

@ -35,6 +35,8 @@ export class UserAppEvent {
setTimeout(() => {
const filePath = path.join(
this.app.getBaseDir(),
'..',
'src',
'modules',
'user',
'config.ts'