• Setup a maintenance endpoint for the service. The endpoint will be setup with a default middleware which offers basic commands for troubleshooting the service (see basicMaintenanceRequestHandlerFactory). The endpoint can be extended with more middleware as required by the service.

    The endpoint will be guarded by an HTTP Basic Auth credential as defined in the config object (maintenanceEndpointUserName : maintenanceEndpointPassword).

    The listening port will be as defined in maintenanceEndpointPort of the config object (Defaults to 9911 if unspecified).

    DANGEROUS: It is highly recommended to keep this endpoint behind a Firewall as it may allow destructive operations on the service.

    Parameters

    • config: ValueObject<{
          environment: (() => "test" | "development" | "production");
          fullDevLogs: (() => boolean);
          healthEndpointPort: (() => number);
          isDev: (() => boolean);
          isProd: (() => boolean);
          logLevel: (() => "" | "FATAL" | "ERROR" | "WARN" | "INFO" | "DEBUG" | "TRACE");
          logMaskKeywords: (() => string[]);
          logMaskMaxDepth: (() => number);
          secureLoggingMode: (() => MaskMode);
          serviceId: (() => string);
      }> & ValueObject<{
          maintenanceEndpointPassword: (() => string);
          maintenanceEndpointPort: (() => undefined | number);
          maintenanceEndpointUserName: (() => string);
      }>

      The config object of the service.

    • Rest ...maintenanceRequestHandlers: RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>[]

      A variadic list of middleware to be used to on the maintenance endpoint. When unspecified, the basicMaintenanceRequestHandlerFactory will be used to generate a RequestHandler.

    Returns void

Generated using TypeDoc