Observed since 20 Oct, 22:15 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Nest - modern, fast, powerful node.js web framework (@terminus)
A progressive Node.js framework for building efficient and scalable server-side applications, heavily inspired by Angular.
This module contains integrated healthchecks for Nest.
@nestjs/terminus integrates with a lot of cool technologies, such as typeorm, grpc, mongodb, and many more!
In case you have missed a dependency, @nestjs/terminus will throw an error and prompt you to install the required dependency.
So you will only install what is actually required!
npm install --save @nestjs/terminus
TypeOrmModule), in case you want to do Database Health Checks.// app.module.ts
@Module({
controllers: [HealthController],
imports:[
// Make sure TypeOrmModule is available in the module context
TypeOrmModule.forRoot({ ... }),
TerminusModule
],
})
export class HealthModule { }
HealthController which executes your Health Check.// health.controller.ts
@Controller('health')
export class HealthController {
constructor(
private health: HealthCheckService,
private db: TypeOrmHealthIndicator,
) {}
@Get()
@HealthCheck()
readiness() {
return this.health.check([
async () => this.db.pingCheck('database', { timeout: 300 }),
]);
}
}
If everything is set up correctly, you can access the healthcheck on http://localhost:3000/health.
{
"status": "ok",
"info": {
"database": {
"status": "up"
}
},
"details": {
"database": {
"status": "up"
}
}
}
For more information, see docs. You can find more samples in the samples/ folder of this repository.
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
Nest is MIT licensed.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.0Registry latest | 23 Mar 2021 | 60 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 22:15 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:e94bc5fb07e268c014abff81b270345c0601307856eca80a3652cb464f13202d