Skip to content

fdorantesm/nestjs-elastic-transcoder

Repository files navigation

NestJS Elastic Transcoder

forRoot method

@Module({
  imports: [
    ElasticTranscoderModule.forRoot({
      accessKeyId: '',
      region: '',
      secretAccessKey: ''
    })
  ]
})
export class AppModule {}

forRootAsync method

@Module({
  imports: [
    ElasticTranscoderModule.forRootAsync({
      imports: [ConfigModule.forFeature(elasticTranscoderLoader)],
      inject: [ConfigService],
      useFactory(configService: ConfigService) {
        return {
          accessKeyId: configService.get('accessKeyId'),
          region: configService.get('region'),
          secretAccessKey: configService.get('secretAccessKey')
        };
      }
    })
  ]
})
export class AppModule {}

forFeature method

@Module({
  imports: [
    ElasticTranscoderModule.forFeature()
  ]
})
export class VideosModule {}