You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nest-typed-config is a module which enables defining config schema like request DTOs, and it supports reading configuration from environment variables, local files or remote configuration center.
In this boilerplate, three types of configurations are included: App, JWT and DB, which can be defined in a local toml file for better organization:
More importantly, nest-typed-config provides type-safe configurations, for example in app.module.ts:
TypeOrmModule.forRootAsync({// DBConfig is defined in config schema, and automatically injecteduseFactory: (dbConfig: DBConfig)=>{return{
...dbConfig,entities: [__dirname+'./../**/**.entity{.ts,.js}'],synchronize: dbConfig.sync,};// No type casting is required},})
Please let me know your thoughts, and I can open a pull request if this sounds good.
The text was updated successfully, but these errors were encountered:
Nest-typed-config
is a module which enables defining config schema like request DTOs, and it supports reading configuration from environment variables, local files or remote configuration center.In this boilerplate, three types of configurations are included: App, JWT and DB, which can be defined in a local
toml
file for better organization:More importantly,
nest-typed-config
provides type-safe configurations, for example inapp.module.ts
:Please let me know your thoughts, and I can open a pull request if this sounds good.
The text was updated successfully, but these errors were encountered: