//nestjs-dynamic-modules-with-importsbyMickL

nestjs-dynamic-modules-with-imports

Sandbox for testing how to inject an existing provider into a useFactory function

2
1
2
TypeScript

NestJS Sandbox: Configurable dynamic modules that import other configurable dynamic modules

This is a sandbox for figuring out how to pass (async) config to a dynamic module and importing/configuring another dynamic module with it.

The example here follows the exact same pattern as modules like @nestjs/config, @nestjs/jwt, @nestjs/mongoose, @nestjs/jwt, @nestjs/common/cache, @nestjs/common/http, etc. and is described in this article: https://dev.to/nestjs/advanced-nestjs-how-to-build-completely-dynamic-nestjs-modules-1370

Feel free to make a PR to solve the issue or answer the question at Stackoverflow.

Installation

$ npm install
# or
$ yarn install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod
[beta]v0.13.0