Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface BackendApplicationContribution

Contribution for hooking into the backend lifecycle.

Hierarchy

  • BackendApplicationContribution

Implemented by

Index

Methods

Optional configure

  • Called after the initialization of the backend application is complete. Use this to configure the Express app before it is started, for example to offer additional endpoints.

    The implementation may be async, however it will still block the configuration step until it's resolved.

    Parameters

    • app: express.Application

      the express application to configure.

    Returns MaybePromise<void>

    either undefined or a Promise resolving to undefined.

Optional initialize

  • Called during the initialization of the backend application. Use this for functionality which has to run as early as possible.

    The implementation may be async, however it will still block the initialization step until it's resolved.

    Returns MaybePromise<void>

    either undefined or a Promise resolving to undefined.

Optional onStart

  • Called right after the server for the Express app is started. Use this to additionally configure the server or as ready-signal for your service.

    The implementation may be async, however it will still block the startup step until it's resolved.

    Parameters

    • server: Server | Server

      the backend server running the express app.

    Returns MaybePromise<void>

    either undefined or a Promise resolving to undefined.

Optional onStop

  • onStop(app?: express.Application): void
  • Called when the backend application shuts down. Contributions must perform only synchronous operations. Any kind of additional asynchronous work queued in the event loop will be ignored and abandoned.

    Parameters

    • Optional app: express.Application

      the express application.

    Returns void