chore: mongo傻逼
This commit is contained in:
parent
1e371d17b0
commit
90dc0c043e
|
@ -30,12 +30,5 @@ export default (appInfo: MidwayAppInfo): MidwayConfig => {
|
|||
db: 0,
|
||||
},
|
||||
},
|
||||
mongoose: {
|
||||
dataSource: {
|
||||
default: {
|
||||
uri: 'mongodb://backset:cr654654.@mozzie.cn:37017/backset',
|
||||
},
|
||||
},
|
||||
},
|
||||
} as MidwayConfig;
|
||||
};
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user