Last active
February 3, 2023 06:39
-
-
Save rjpkuyper/b4dedd481e0617c19b3ebbeb49758904 to your computer and use it in GitHub Desktop.
Dynamic module approach
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Module({}) | |
export class MyDynamicModule { | |
static register(config): DynamicModule { | |
const { customPath } = config; | |
const MyController = createDynamicController({ customPath }) | |
return { | |
module: MyDynamicModule, | |
providers: [ | |
MyService | |
], | |
exports: [MyService], | |
controllers: [MyController] | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment