MCPcopy Index your code
hub / github.com/loopbackio/loopback-next / constructor

Method constructor

packages/boot/src/bootstrapper.ts:38–52  ·  view source on GitHub ↗
(
    @inject(CoreBindings.APPLICATION_INSTANCE)
    private app: Application & Bootable,
    @inject(BootBindings.PROJECT_ROOT) private projectRoot: string,
    @inject(BootBindings.BOOT_OPTIONS, {optional: true})
    private bootOptions: BootOptions = {},
  )

Source from the content-addressed store, hash-verified

36 */
37export class Bootstrapper {
38 constructor(
39 @inject(CoreBindings.APPLICATION_INSTANCE)
40 private app: Application & Bootable,
41 @inject(BootBindings.PROJECT_ROOT) private projectRoot: string,
42 @inject(BootBindings.BOOT_OPTIONS, {optional: true})
43 private bootOptions: BootOptions = {},
44 ) {
45 // Resolve path to projectRoot and re-bind
46 this.projectRoot = resolve(this.projectRoot);
47 app.bind(BootBindings.PROJECT_ROOT).to(this.projectRoot);
48
49 // This is re-bound for testing reasons where this value may be passed directly
50 // and needs to be propagated to the Booters via DI
51 app.bind(BootBindings.BOOT_OPTIONS).to(this.bootOptions);
52 }
53
54 /**
55 * Function is responsible for calling all registered Booter classes that

Callers

nothing calls this directly

Calls 4

injectFunction · 0.85
toMethod · 0.80
resolveFunction · 0.50
bindMethod · 0.45

Tested by

no test coverage detected