Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
T

terminus

> 后端框架
Open source

Terminus module for Nest framework (node.js) :robot:

741 stars0 likes1 views
WebsiteGitHub

About

Terminus module for Nest framework (node.js) :robot:

A progressive Node.js framework for building efficient and scalable server-side applications, heavily inspired by Angular.

Description

This module contains integrated healthchecks for Nest.

Installation

@nestjs/terminus integrates with a lot of technologies, such as typeorm, grpc, mongodb, and many more!

bash

npm install --save @nestjs/terminus

Usage

  1. Import the Terminus module
  2. Make sure the additionally needed modules are available to (e.g. TypeOrmModule), in case you want to do Database Health Checks.
typescript
// app.module.ts

@Module({
  controllers: [HealthController],
  imports:[
    // Make sure TypeOrmModule is available in the module context
    TypeOrmModule.forRoot({ ... }),
    TerminusModule
  ],
})
export class HealthModule { }
  1. Setup your HealthController which executes your Health Check.
typescript
// 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').withTimeout(1000),
    ]);
  }
}

If everything is set up correctly, you can access the healthcheck on http://localhost:3000/health.

json
{
  "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.

Contribute

In order to get started, first read through our Contributing guidelines.

Setup

Setup the development environment by following these instructions:

  1. Fork & Clone the repository
  2. Install the dependencies
bash
pnpm i
pnpm dev

In order to test the library against a sample, go to a sample, build it and start it:

bash
cd sample/000-dogs-app
pnpm build
pnpm start

[!NOTE] Once the library is rebuilt, the sample needs to be rebuilt and restarted in order to pick up the changes.

Test

For unit testing run the following command:

bash
pnpm test

For e2e testing, a Docker Compose stack is required. Make sure Docker is installed on your machine and run the following command.

bash
docker compose up -d
pnpm test:e2e

Support

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.

Stay in touch

  • Author - Kamil Myśliwiec and Livio Brunner
  • Website - https://nestjs.com
  • Twitter - @nestframework

License

Nest is MIT licensed.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptjavascriptnestnestjsnode

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category后端框架
PricingOpen source

> Related tools

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架