Skip to content

Commit

Permalink
examples(@nestjs) update plain mongoose example
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Jan 21, 2018
1 parent 7446873 commit 43e9949
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions examples/06-mongoose/src/database/database.providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ import * as mongoose from 'mongoose';
export const databaseProviders = [
{
provide: 'DbConnectionToken',
useFactory: async (): Promise<mongoose.Connection> => {
(mongoose as any).Promise = global.Promise;
return await mongoose.connect('mongodb://localhost/nest', {
useMongoClient: true,
});
},
useFactory: async (): Promise<mongoose.Connection> =>
await mongoose.connect('mongodb://localhost/nest'),
},
];

0 comments on commit 43e9949

Please sign in to comment.