Skip to main content

HttpHealthCheckStrategy

HttpHealthCheckStrategy

A HealthCheckStrategy used to check health by pinging a url. Internally it uses the NestJS HttpHealthIndicator.

Example

import { HttpHealthCheckStrategy, TypeORMHealthCheckStrategy } from '@vendure/core';

export const config = {
// ...
systemOptions: {
healthChecks: [
new TypeORMHealthCheckStrategy(),
new HttpHealthCheckStrategy({ key: 'my-service', url: 'https://my-service.com' }),
]
},
};
Signature
class HttpHealthCheckStrategy implements HealthCheckStrategy {
constructor(options: HttpHealthCheckOptions)
init(injector: Injector) => ;
getHealthIndicator() => HealthIndicatorFunction;
}

constructor

method
(options: HttpHealthCheckOptions) => HttpHealthCheckStrategy

init

method
(injector: Injector) =>

getHealthIndicator

method
() => HealthIndicatorFunction