{"id":13598774,"url":"https://github.com/nestjs/terminus","last_synced_at":"2025-05-13T22:04:45.577Z","repository":{"id":37334638,"uuid":"145966530","full_name":"nestjs/terminus","owner":"nestjs","description":"Terminus module for Nest framework (node.js)  :robot:","archived":false,"fork":false,"pushed_at":"2025-05-05T18:40:09.000Z","size":59965,"stargazers_count":702,"open_issues_count":22,"forks_count":103,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-07T22:02:53.125Z","etag":null,"topics":["javascript","nest","nestjs","node","nodejs","typescript"],"latest_commit_sha":null,"homepage":"https://nestjs.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nestjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"open_collective":"nest"}},"created_at":"2018-08-24T08:43:59.000Z","updated_at":"2025-05-05T12:54:50.000Z","dependencies_parsed_at":"2022-07-10T14:46:44.716Z","dependency_job_id":"e4f1f09f-d55e-43f0-9d81-0e6f47a2d78f","html_url":"https://github.com/nestjs/terminus","commit_stats":{"total_commits":2487,"total_committers":47,"mean_commits":52.91489361702128,"dds":0.4342581423401689,"last_synced_commit":"596df60015880963b966758c04bd208a38cb4dc8"},"previous_names":[],"tags_count":84,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestjs%2Fterminus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestjs%2Fterminus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestjs%2Fterminus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestjs%2Fterminus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nestjs","download_url":"https://codeload.github.com/nestjs/terminus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254036816,"owners_count":22003653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","nest","nestjs","node","nodejs","typescript"],"created_at":"2024-08-01T17:00:56.134Z","updated_at":"2025-05-13T22:04:45.520Z","avatar_url":"https://github.com/nestjs.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://nestjs.com/\" target=\"blank\"\u003e\u003cimg src=\"https://nestjs.com/img/logo-small.svg\" width=\"120\" alt=\"Nest Logo\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n  \u003cp align=\"center\"\u003eA progressive \u003ca href=\"http://nodejs.org\" target=\"blank\"\u003eNode.js\u003c/a\u003e framework for building efficient and scalable server-side applications, heavily inspired by \u003ca href=\"https://angular.io\" target=\"blank\"\u003eAngular\u003c/a\u003e.\u003c/p\u003e\n    \u003cp align=\"center\"\u003e\n\u003ca href=\"https://www.npmjs.com/package/@nestjs/terminus\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@nestjs/terminus.svg\" alt=\"NPM Version\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/@nestjs/terminus\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/@nestjs/terminus.svg\" alt=\"Package License\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/@nestjs/terminus\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/@nestjs/terminus.svg\" alt=\"NPM Downloads\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://discord.gg/G7Qnnhy\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/discord-online-brightgreen.svg\" alt=\"Discord\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/nest#backer\"\u003e\u003cimg src=\"https://opencollective.com/nest/backers/badge.svg\" alt=\"Backers on Open Collective\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/nest#sponsor\"\u003e\u003cimg src=\"https://opencollective.com/nest/sponsors/badge.svg\" alt=\"Sponsors on Open Collective\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://paypal.me/kamilmysliwiec\"\u003e\u003cimg src=\"https://img.shields.io/badge/Donate-PayPal-dc3d53.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://twitter.com/nestframework\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/nestframework.svg?style=social\u0026label=Follow\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n  \u003c!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)\n  [![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)--\u003e\n\n## Description\n\nThis module contains integrated healthchecks for [Nest](https://github.com/nestjs/nest).\n\n## Installation\n\n`@nestjs/terminus` integrates with a lot of cool technologies, such as `typeorm`, `grpc`, `mongodb`, and many more!\nIn case you have missed a dependency, `@nestjs/terminus` will throw an error and prompt you to install the required dependency.\nSo you will only install what is actually required!\n\n```bash\n\nnpm install --save @nestjs/terminus\n\n```\n\n## Usage\n\n1. Import the Terminus module\n2. Make sure the additionally needed modules are available to (e.g. `TypeOrmModule`), in case you want to do Database Health Checks.\n\n```typescript\n// app.module.ts\n\n@Module({\n  controllers: [HealthController],\n  imports:[\n    // Make sure TypeOrmModule is available in the module context\n    TypeOrmModule.forRoot({ ... }),\n    TerminusModule\n  ],\n})\nexport class HealthModule { }\n\n```\n\n3. Setup your `HealthController` which executes your Health Check.\n\n```typescript\n// health.controller.ts\n\n@Controller('health')\nexport class HealthController {\n  constructor(\n    private health: HealthCheckService,\n    private db: TypeOrmHealthIndicator,\n  ) {}\n\n  @Get()\n  @HealthCheck()\n  readiness() {\n    return this.health.check([\n      async () =\u003e this.db.pingCheck('database', { timeout: 300 }),\n    ]);\n  }\n}\n```\n\nIf everything is set up correctly, you can access the healthcheck on `http://localhost:3000/health`.\n\n```json\n{\n  \"status\": \"ok\",\n  \"info\": {\n    \"database\": {\n      \"status\": \"up\"\n    }\n  },\n  \"details\": {\n    \"database\": {\n      \"status\": \"up\"\n    }\n  }\n}\n```\n\nFor more information, [see docs](https://docs.nestjs.com/recipes/terminus).\nYou can find more samples in the [samples/](https://github.com/nestjs/terminus/tree/master/sample) folder of this repository.\n\n## Contribute\n\nIn order to get started, first read through our [Contributing guidelines](https://github.com/nestjs/terminus/blob/master/CONTRIBUTING.md).\n\n### Setup\n\nSetup the development environment by following these instructions:\n\n1. Fork \u0026 Clone the repository\n2. Install the dependencies\n\n```bash\npnpm i\npnpm dev\n```\n\nIn order to test the library against a sample, simply go to a sample and run\n`pnpm start:dev`\n\n```typescript\ncd sample/000-dogs-app\npnpm start:dev\n```\n\n\u003e [!NOTE] \n\u003e Once the library is rebuilt, the `pnpm start:dev` within a sample\n\u003e needs to be restarted in order to pick up the changes.\n\n### Test\n\nFor unit testing run the following command:\n\n```bash\npnpm test\n```\n\nFor e2e testing, a Docker Compose stack is required. Make sure\nDocker is installed on your machine and run the following command.\n\n```bash\ndocker compose up -d\npnpm test:e2e\n```\n\n## Support\n\nNest 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](https://docs.nestjs.com/support).\n\n## Stay in touch\n\n- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com) and [Livio Brunner](https://brunnerliv.io)\n- Website - [https://nestjs.com](https://nestjs.com/)\n- Twitter - [@nestframework](https://twitter.com/nestframework)\n\n## License\n\nNest is [MIT licensed](LICENSE).\n","funding_links":["https://opencollective.com/nest","https://paypal.me/kamilmysliwiec"],"categories":["Components \u0026 Libraries","TypeScript","资源"],"sub_categories":["组件和库"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnestjs%2Fterminus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnestjs%2Fterminus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnestjs%2Fterminus/lists"}