Three statements in one, the way every declaration decorator works here:
It is a service. The container builds it, as a singleton, so the check holds the very client it
is checking: the database pool, the cache, the queue.
It is reachable by name. The alias is bound as health:<name>, prefixed so a check named after
a dependency never competes with the application's own binding for it.
It activates the module. Declaring a check is the whole setup.
Type Parameters
TextendsClassType = ClassType
Parameters
Optionalname: string
What the report calls it. Defaults to the class name.
Declare a class as a health check.
Three statements in one, the way every declaration decorator works here:
health:<name>, prefixed so a check named after a dependency never competes with the application's own binding for it.