chore: env

This commit is contained in:
xiaojunnuo
2023-06-29 09:31:26 +08:00
parent 3791d92d67
commit 1e641b83c1
3 changed files with 6 additions and 0 deletions

View File

@@ -14,6 +14,8 @@ const development = {
port: 7001,
},
staticFile: {
maxAge: 31536000,
buffer: true,
dirs: {
default: {
prefix: '/',

View File

@@ -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],
@@ -54,5 +55,7 @@ export class ContainerLifeCycle {
//授权处理
AuthorityMiddleware,
]);
logger.info('当前环境:', this.app.getEnv()); // prod
}
}