Put in order · NestJS course · Module 3: TypeORM and Databases

Repository configuration in NestJS

Arrange the steps for configuring a TypeORM repository in a NestJS module:

Items to put in order

  • Add TypeOrmModule.forFeature([Entity]) in the module imports
  • Create an entity with @Entity()
  • Use the repository in the service: this.repo.find()
  • Inject via @InjectRepository(Entity) in the service constructor

You can check the correct answer by solving this task in the CodeWorlds game.