@syukurilexs/nestjs-config
v3.0.0
Published
Config Module
Downloads
24
Readme
Installation
npm install @syukurilexs/nestjs-config
Usage
Import ConfigModule
:
@Module({
imports: [ConfigModule],
providers: [...],
})
export class AppModule {}
Inject ConfigService
:
@Injectable()
export class YourService {
constructor(private readonly config: ConfigService) {}
show() {
return this.config.get('MYVAR');
}
}
Declare env variable NODE_ENV=development.env
In order to use this package you need to create config folder on your root directory and then create your .env file
- development.env
- production.env
Change Log
See Changelog for more information.
Contributing
Contributions welcome! See Contributing.
Author
Syukur Kassim (Syukurilexs on Linkedin)
License
Licensed under the MIT License - see the LICENSE file for details.