Skip to main content
Version: Next

LifecycleService.addStartupHook()

Home > @backstage/backend-plugin-api > LifecycleService > addStartupHook

Register a function to be called when the backend has been initialized.

Signature:

addStartupHook(hook: LifecycleServiceStartupHook, options?: LifecycleServiceStartupOptions): void;

Parameters

Parameter

Type

Description

hook

LifecycleServiceStartupHook

options

LifecycleServiceStartupOptions

(Optional)

**Returns:**

void

Remarks

When used with plugin scope it will wait for the plugin itself to have been initialized.

When used with root scope it will wait for all plugins to have been initialized.