How to use the @nestjs/terminus/dist/utils.promiseTimeout function in @nestjs/terminus

To help you get started, we’ve selected a few @nestjs/terminus examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github juicycleff / ultimate-backend / libs / core / src / heath-indicators / mongo.health.ts View on Github external
private async pingDb(connection: MongoClient, timeout: number) {
    const promise =
      connection.isConnected() ? Promise.resolve() : Promise.reject();
    return await promiseTimeout(timeout, promise);
  }

@nestjs/terminus

Terminus integration provides readiness/liveness health checks for NestJS.

MIT
Latest version published 9 months ago

Package Health Score

80 / 100
Full package analysis

Similar packages