Skip to content

Health

@tsed/terminus

Usage

typescript
import { Health } from "@tsed/terminus";

See /packages/third-parties/terminus/src/types/decorators/health.ts.

Overview

ts
function Health(name: string): MethodDecorator;

Description

Create a readiness / liveness checks.

ts
import { Health } from "@tsed/terminus";

@Controller("/mongo")
class MongoCtrl {
  @Health("/health")
  health() {
    // Here check the mongo health
    return Promise.resolve();
  }
}

@param name
@decorator
@terminus

Released under the MIT License.