nest-dynamic-config
TypeScript icon, indicating that this package has built-in type declarations

0.0.8 • Public • Published

Nestjs Dynamic Configuration Module

Installation

$ npm install nest-dynamic-config
or
$ yarn add nest-dynamic-config

Usage

import { Module } from '@nestjs/common';
import { DynamicConfigModule } from "nest-dynamic-config";

@Module({
  imports: [
    DynamicConfigModule.register({ configs: ['your-config-file-path-1', '...'], watch: true })
  ],
})
export class AppModule {}
import { DynamicConfig, DynamicConfigKey } from 'nest-dynamic-config';

@DynamicConfig('optional-prefix')
export class SomeConfig {
  @DynamicConfigKey('config-key')
  port: number;
}
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { enableDynamicConfig } from 'nest-dynamic-config';

async function bootstrap() {
  const app = await NestFactory.create(AppModule);

  await enableDynamicConfig(app);
  // ...
}

bootstrap();

Usage

Working example can be found here

Dependents (0)

Package Sidebar

Install

npm i nest-dynamic-config

Weekly Downloads

0

Version

0.0.8

License

UNLICENSED

Unpacked Size

131 kB

Total Files

24

Last publish

Collaborators

  • kaankarakoc