1.0.0 • Published 6 years ago

nest-config v1.0.0

Weekly downloads
337
License
MIT
Repository
github
Last release
6 years ago

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');
    }
}