chore: mongo傻逼

This commit is contained in:
mozzie 2023-02-17 00:10:06 +08:00
parent 1e371d17b0
commit 90dc0c043e
2 changed files with 3 additions and 12 deletions

View File

@ -30,12 +30,5 @@ export default (appInfo: MidwayAppInfo): MidwayConfig => {
db: 0,
},
},
mongoose: {
dataSource: {
default: {
uri: 'mongodb://backset:cr654654.@mozzie.cn:37017/backset',
},
},
},
} as MidwayConfig;
};

View File

@ -7,10 +7,9 @@ import * as staticFile from '@midwayjs/static-file';
import * as orm from '@midwayjs/typeorm';
import * as dotenv from 'dotenv';
import * as redis from '@midwayjs/redis';
import * as typegoose from '@midwayjs/typegoose';
import { join } from 'path';
// import { DefaultErrorFilter } from './filter/default.filter';
// import { NotFoundFilter } from './filter/notfound.filter';
import { DefaultErrorFilter } from './filter/default.filter';
import { NotFoundFilter } from './filter/notfound.filter';
import { ReportMiddleware } from './middleware/report.middleware';
import { LocalMiddleware } from './middleware/local.middleware';
@ -24,7 +23,6 @@ dotenv.config();
view,
orm,
redis,
typegoose,
{
component: info,
enabledEnvironment: ['local'],
@ -40,6 +38,6 @@ export class ContainerLifeCycle {
// add middleware
this.app.useMiddleware([ReportMiddleware, LocalMiddleware]);
// add filter
// this.app.useFilter([NotFoundFilter, DefaultErrorFilter]);
this.app.useFilter([NotFoundFilter, DefaultErrorFilter]);
}
}