@anchan828/nest-sendgrid-terminus
v0.6.89
Published
A terminus of @sendgrid/mail module for Nest framework (node.js)
Downloads
474
Readme
@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"
}
}
}