Skip to content
This repository has been archived by the owner on Oct 29, 2021. It is now read-only.

Latest commit

 

History

History
36 lines (29 loc) · 619 Bytes

README.md

File metadata and controls

36 lines (29 loc) · 619 Bytes

Deprecated in flavor of @nestjs-steroids/environment

nest-config

Configuration module for Nest.js (wraps convict module).

INSTALL

npm i -S nest-config

USAGE

import { ConfigModule } from 'nest-config';
import { Module } from '@nestjs/common';

@Module({
    imports: [ConfigModule.forRoot(schema: convict.Schema<T> | string)],
})
export class AppModule {
}
export class UserController {
    
    constructor (
        private config: ConfigService
    ) { }

    hello() {
        const foo = this.config.get<string>('foo');
    }
}