Skip to content

syukurilexs/nestjs-config

Repository files navigation

NestJS Custom Config Package (simple config service)

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.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published