Page Contents
Home > @loopback/core > Application > onStop
Application.onStop() method
Register a function to be called when the application starts.
This is a shortcut for adding a binding for a LifeCycleObserver implementing a start() method.
Signature:
onStop(fn: () => ValueOrPromise<void>): Binding<LifeCycleObserver>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| fn | () => ValueOrPromise<void> | The function to invoke, it can be synchronous (returning void) or asynchronous (returning Promise<void>). |
Returns:
The LifeCycleObserver binding created.