1.0.13 • Published 3 years ago

@godigit/nestjs-master-lib v1.0.13

Weekly downloads
20
License
MIT
Repository
github
Last release
3 years ago

Installation

  1. Run npm/yarn install
npm install --save @godigit/nestjs-master-lib
  1. Setting config in parent module controller
import { Controller, Get } from '@nestjs/common';
import { AppService } from './app.service';
import {MasterLibService} from "@godigit/nestjs-master-lib/dist/master-lib/master-lib.service";
import {MasterLibConfig} from "@godigit/nestjs-master-lib/dist/master-lib/interface/master-lib-config.interface";
import * as path from "path";
import {ConfigService} from "./services/config/config.service";

@Controller()
export class AppController {
    //import master-lib service 'private masterLib: MasterLibService'
  constructor(private readonly appService: AppService, private masterLib: MasterLibService, private config : ConfigService) {
    //setting master-lib config using MasterLibConfig interface
    const configApiPath = path.join(__dirname,"configs","api-config")
    const configFormPath = path.join(__dirname,"configs","form-config")
    const masterLibConfig: MasterLibConfig = {
      config: config,
      formPathConfig: configFormPath,
      apiPathConfig: configApiPath
    }
    this.masterLib.setConfig(masterLibConfig)
  }

  @Get()
  getHello(): string {
    return this.appService.getHello();
  }
}

Change Log

See Changelog for more information.

Contributing

Contributions welcome! See Contributing.

Author

Godigit Public Library (Y Prospect on Discord)

License

Licensed under the MIT License - see the LICENSE file for details.

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9-beta1

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.1-beta3

4 years ago

1.0.1-beta4

4 years ago

1.0.1-beta2

4 years ago

1.0.1-beta1

4 years ago

1.0.0

4 years ago