@codemaskjs/nestjs-config
TypeScript icon, indicating that this package has built-in type declarations

1.4.1 • Public • Published

Codemask Nestjs Config Module

How to Install

Required peer dependencies

[!NOTE] If your project already uses @nestjs/common, class-validator and/or class-transformer - then skip installing mentioned peer dependencies.

$ yarn add @nestjs/common class-validator class-transformer

Adding package to your project

$ yarn add @codemaskjs/nestjs-config

Configuration

Configuring ConfigModule for root

For providing globally available configs, use the example from below:

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

@Module({
    imports: [
        ConfigModule.forRoot()
        // or
        ConfigModule.forRoot([<your config class>, ...])
        // or
        ConfigModule.forFeature([<your config class>, ...])
        // or
        ConfigModule.forTest(<your config class>, <optional and partial overrides>)
    ]
})
export class MailerModule {}

Examples

  1. Config Class

To be updated

  1. Config Module

Using forRoot

To be updated

Using forFeature

To be updated

Using forFeature with TypeOrm

  1. Config Service

To be updated

Readme

Keywords

Package Sidebar

Install

npm i @codemaskjs/nestjs-config

Weekly Downloads

37

Version

1.4.1

License

MIT

Unpacked Size

27.9 kB

Total Files

30

Last publish

Collaborators

  • pwalczak