@anchan828/nest-sendgrid-terminus
TypeScript icon, indicating that this package has built-in type declarations

0.6.92 • Public • Published

@anchan828/nest-sendgrid-terminus

Supported Versions

  • NestJS 8: v0.5.x
  • NestJS 9: v0.6.x

Description

The terminus of @sendgrid/mail module for Nest.

Installation

$ npm i --save @anchan828/nest-sendgrid-terminus @nestjs/terminus

Quick Start

@Module({
  imports: [TerminusModule, SendGridHealthModule],
})
export class HealthModule {}

@Controller("health")
export class HealthController {
  constructor(private health: HealthCheckService, private sendgrid: SendGridHealthIndicator) {}

  @Get()
  @HealthCheck()
  readiness() {
    return this.health.check([async () => this.sendgrid.isHealthy()]);
  }
}

/health response

{
  "status": "ok",
  "info": {
    "sendgrid": {
      "status": "up",
      "apiStatus": "operational"
    }
  },
  "error": {},
  "details": {
    "sendgrid": {
      "status": "up",
      "apiStatus": "operational"
    }
  }
}

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @anchan828/nest-sendgrid-terminus

Weekly Downloads

84

Version

0.6.92

License

MIT

Unpacked Size

8.56 kB

Total Files

11

Last publish

Collaborators

  • anchan828