3.0.0 • Published 1 year ago

@syukurilexs/nestjs-config v3.0.0

Weekly downloads
12
License
MIT
Repository
github
Last release
1 year ago

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.