How to use the @loopback/boot.BootBindings.PROJECT_ROOT function in @loopback/boot

To help you get started, we’ve selected a few @loopback/boot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github strongloop / loopback-next / packages / booter-lb3app / src / lb3app.booter.ts View on Github external
constructor(
    @inject(CoreBindings.APPLICATION_INSTANCE)
    public app: RestApplication,
    @inject(BootBindings.PROJECT_ROOT)
    public projectRoot: string,
    @inject(`${BootBindings.BOOT_OPTIONS}#lb3app`)
    options: Partial = {},
  ) {
    this.options = Object.assign({}, DefaultOptions, options);

    if (typeof app.mountExpressRouter !== 'function') {
      throw new Error(
        'Lb3AppBooter requires RestApplication with mountExpressRouter API',
      );
    }
  }
github strongloop / loopback-next / packages / v3compat / src / boot / lb3-model-booter.ts View on Github external
constructor(
    @inject(CoreBindings.APPLICATION_INSTANCE)
    public app: Application & {v3compat: Lb3Application},
    @inject(BootBindings.PROJECT_ROOT)
    public projectRoot: string,
    @inject(`${BootBindings.BOOT_OPTIONS}#v3compat`)
    options: Partial = {},
  ) {
    this.options = Object.assign({}, DefaultOptions, options);
  }

@loopback/boot

A collection of Booters for LoopBack 4 Applications

MIT
Latest version published 10 days ago

Package Health Score

89 / 100
Full package analysis

Similar packages