Skip to content

Commit

Permalink
fixed compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
electricmonk committed May 29, 2024
1 parent 30ac378 commit 03b1ebb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/server/src/adapters/mongodb.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,8 @@ export class MongoDBModule {
exports: [PRODUCT_REPO, ORDER_REPO, CART_REPO]
}
}

static default() {
return this.forRoot({uri: `mongodb://root:password@127.0.0.1`, dbName: "storeDB"});
}
}
2 changes: 1 addition & 1 deletion packages/server/src/app.module.overrides.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {CartController, CheckoutController, OrderController, ProductController}
import {MongoDBModule} from "./adapters/mongodb.module";

@Module({
imports: [MongoDBModule.forRoot(`mongodb://root:password@127.0.0.1`)],
imports: [MongoDBModule.default()],
controllers: [CartController, ProductController, OrderController, CheckoutController]
})
export class AppModuleOverrides {
Expand Down

0 comments on commit 03b1ebb

Please sign in to comment.