nestjs/azure-storage

Add forRootAsync for configuration via configService

开放

#36 创建于 2019年9月24日

 (3 条评论) (2 个反应) (1 位负责人)TypeScript (38 个派生)github user discovery
Hacktoberfesteffort1: hoursgood first issuescope: nestjs

仓库指标

星标
 (88 个星标)
PR 合并指标
 (平均合并 4小时 43分钟) (30 天内合并 9 个 PR)

描述

I'm submitting a...

Current behavior

Currently, it's only possible to instantiate the module via the .withConfig method. It is not possible to inject a service into this method, so it is impossible to use a config service for the module instantiation.

Expected behavior

Enable both the .withConfig method and a factory-pattern method, that allows dependency injection.

What is the motivation / use case for changing the behavior?

I don't want to use process.env variables as all my config logic is inside a config module. It is possible to override this behavior by manually injecting all config values into process.env, but this seems like a bad choice.

Environment

贡献者指南