How to use the nestjs-config.Configurable function in nestjs-config

To help you get started, we’ve selected a few nestjs-config examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nestjsx / nestjs-config / examples / decorators / user.controller.ts View on Github external
import { Controller, Get } from '@nest/common';
import { ConfigParam, Configurable } from 'nestjs-config';

@Controller('user')
export default class UserController {
  @Get('')
  @Configurable()
  index(
    @ConfigParam('user.name', 'test')
    username,
    @ConfigParam('app.development') live,
  ): object {
    return {
      username: username,
      live: live,
    };
  }
}

nestjs-config

Easy to use Nest configuration module

MIT
Latest version published 1 year ago

Package Health Score

54 / 100
Full package analysis