@codemaskjs/nestjs-config
v1.4.2
Published
Nestjs Config Module
Downloads
131
Readme
Codemask Nestjs Config Module
How to Install
Required peer dependencies
[!NOTE] If your project already uses @nestjs/common, class-validator and/or class-transformer - then skip installing mentioned peer dependencies.
$ yarn add @nestjs/common class-validator class-transformer
Adding package to your project
$ yarn add @codemaskjs/nestjs-config
Configuration
Configuring ConfigModule for root
For providing globally available configs, use the example from below:
import { Module } from '@nestjs/common'
import { ConfigModule } from '@codemaskjs/nestjs-config'
@Module({
imports: [
ConfigModule.forRoot()
// or
ConfigModule.forRoot([<your config class>, ...])
// or
ConfigModule.forFeature([<your config class>, ...])
// or
ConfigModule.forTest(<your config class>, <optional and partial overrides>)
]
})
export class MailerModule {}
Examples
- Config Class
To be updated
- Config Module
Using forRoot
To be updated
Using forFeature
To be updated
Using forFeature
with TypeOrm
- Config Service
To be updated