Skip to content

Instantly share code, notes, and snippets.

@PCreations
Created May 31, 2024 17:00
Show Gist options
  • Save PCreations/eff81af95c9424d3476547ef56a5364d to your computer and use it in GitHub Desktop.
Save PCreations/eff81af95c9424d3476547ef56a5364d to your computer and use it in GitHub Desktop.
c0a2e3b039d9.diff
-1,10 +1,18 @@
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
-import { AppService } from './app.service';
+import { AddBookUseCase } from './add-book.usecase';
+import { StubBookRepository } from './stub.book-repository';
+import { BookRepository } from './book-repository.port';
@Module({
imports: [],
controllers: [AppController],
- providers: [AppService],
+ providers: [
+ {
+ provide: BookRepository,
+ useValue: StubBookRepository,
+ },
+ AddBookUseCase,
+ ],
})
export class AppModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment