Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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',
);
}
}
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);
}