0.0.8 • Published 10 months ago

nest-dynamic-config v0.0.8

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
10 months ago

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

0.0.8

10 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago