0.0.5 • Published 2 years ago

nestjs-world-cup-lib v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Description

Use ConfigurableModuleBuilder of NestJS 9 to build library in an easy way.

Installation

$ npm i nestjs-world-cup-lib

Register synchronously

@Module({
  WorldCupModule.forRoot({
    year: 1994,
    favoriteCountry: 'Brazil',
  })
})
export class AppModule {}

Register asynchronously

@Module({
  ...WorldCupModule.forRootAsync({
    imports: [ConfigModule],
    inject: [ConfigService],
    useFactory: (service: ConfigService) => ({
      year: service.get<number>('YEAR'),
      favoriteCountry: service.get<string>('FAVORITE_COUNTRY'),
    }),
  }),
})
export class AppModule {}
0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago