@@ -6,6 +6,7 @@ import { ConfigModule } from '../../lib/config.module';
66import { ConfigService } from '../../lib/config.service' ;
77import databaseConfig from './database.config' ;
88import nestedDatabaseConfig from './nested-database.config' ;
9+ import symbolDatabaseConfig , { DATABASE_SYMBOL_TOKEN } from './symbol-database.config' ;
910
1011type Config = {
1112 database : ConfigType < typeof databaseConfig > & {
@@ -31,7 +32,7 @@ export class AppModule {
3132 @Optional ( )
3233 @Inject ( databaseConfig . KEY )
3334 private readonly dbConfig : ConfigType < typeof databaseConfig > ,
34- ) { }
35+ ) { }
3536
3637 /**
3738 * This method is not meant to be used anywhere! It just here for testing
@@ -175,6 +176,17 @@ export class AppModule {
175176 } ;
176177 }
177178
179+ static withSymbolLoadedConfigurations ( ) : DynamicModule {
180+ return {
181+ module : AppModule ,
182+ imports : [
183+ ConfigModule . forRoot ( {
184+ load : [ symbolDatabaseConfig ] ,
185+ } ) ,
186+ ] ,
187+ } ;
188+ }
189+
178190 static withDynamicLoadedConfigurations (
179191 configFactory : ConfigFactory [ ] ,
180192 ) : DynamicModule {
@@ -249,4 +261,8 @@ export class AppModule {
249261 getNestedDatabaseHost ( ) {
250262 return this . configService . get ( 'database.driver.host' ) ;
251263 }
264+
265+ getSymbolDatabaseConfig ( ) {
266+ return this . configService . get ( DATABASE_SYMBOL_TOKEN )
267+ }
252268}
0 commit comments