We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7446873 commit 43e9949Copy full SHA for 43e9949
1 file changed
examples/06-mongoose/src/database/database.providers.ts
@@ -3,11 +3,7 @@ import * as mongoose from 'mongoose';
3
export const databaseProviders = [
4
{
5
provide: 'DbConnectionToken',
6
- useFactory: async (): Promise<mongoose.Connection> => {
7
- (mongoose as any).Promise = global.Promise;
8
- return await mongoose.connect('mongodb://localhost/nest', {
9
- useMongoClient: true,
10
- });
11
- },
+ useFactory: async (): Promise<mongoose.Connection> =>
+ await mongoose.connect('mongodb://localhost/nest'),
12
},
13
];
0 commit comments