Core
Framework v2.x
2

trigger #

Available since 2.8.0

Triggers an event.

If an internal event is triggered, the payload must be the same as the one usually expected.

trigger (event: string, ...payload): Promise<any>

Returns #

Returns a Promise resolving to the pipe chain result.

Usage #

await app.trigger('prometheus:start-metrics')