Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@godigit/nestjs-master-lib

Package Overview
Dependencies
Maintainers
3
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@godigit/nestjs-master-lib

nest master lib

latest
Source
npmnpm
Version
1.0.13
Version published
Maintainers
3
Created
Source

Nest Logo

NestJS npm Package Starter

Installation

  • Run npm/yarn install
npm install --save @godigit/nestjs-master-lib
  • 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.

Keywords

nestjs

FAQs

Package last updated on 23 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts