0.1.10 • Published 5 years ago

nestjs-configure v0.1.10

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Description

config module for nestjs using dotenv and jsyaml

Install

npm install nestjs-configure --save or yarn add nestjs-configure

Basic usage

use .env or bootstrap.yml manage config

.env

test=1
ip=localhost

bootstrap.yml

# bootstrap.yml
this: is
a:
  - YAML
  - example

# config 
{ this: 'is', a: [ 'YAML', 'example' ] }
import { Module } from '@nestjs/common';
import { ConfigModule } from 'nestjs-configure';

@Module({
  imports: [ConfigModule.load()]
})
export class AppModule {
  
}
import { Injectable } from '@nestjs/common';
import { ConfigService } from 'nestjs-configure';

@Injectable()
class TestService {
    constructor(private config: ConfigService) {}

    getConfig() {
        return this.config.getConfig();
    }
}
0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago