【发布时间】:2020-08-24 08:40:48
【问题描述】:
我有 conversations.module.ts 有:
@Module({
imports: [ImageModule, YoutubeModule],
controllers: [ConversationsController],
providers: [ConversationsService, ParticipantsService, StreamsService]
})
export class ConversationsModule { }
在我的conversations.controller.ts 中,我有:
@Controller('conversations')
export class ConversationsController {
constructor(private conversationsService: ConversationsService, private imageService: ImageService, private youtubeService: YoutubeService, private participantsService: ParticipantsService, private streamsService: StreamsService) { }
但我想做的是注入 AWS S3 模块:
const secretsmanager = new S3({ region: 'us-east-1' })
这需要它被实例化。我怎样才能做到这一点?
【问题讨论】:
标签: javascript node.js typescript dependency-injection nestjs