All Projects → nestjs → Terminus

nestjs / Terminus

Licence: mit
Terminus module for Nest framework (node.js) 🤖

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to Terminus

serverless-core-deprecated
[Deprecated] Serverless Core module for Nest framework (node.js) 🦊
Stars: ✭ 169 (-38.99%)
Mutual labels:  nest, nestjs
nest-blog-api
B站全栈之巅:基于TypeScript的NodeJs框架:NestJs开发博客API (node.js+nest.js)
Stars: ✭ 34 (-87.73%)
Mutual labels:  nest, nestjs
nestjs-redis
Redis(ioredis) module for NestJS framework
Stars: ✭ 112 (-59.57%)
Mutual labels:  nest, nestjs
nest-blog
A simple blog server system build with Nest.
Stars: ✭ 22 (-92.06%)
Mutual labels:  nest, nestjs
node-nestjs-structure
Node.js framework NestJS project structure
Stars: ✭ 258 (-6.86%)
Mutual labels:  nest, nestjs
dothq.co
This repository has moved to:
Stars: ✭ 17 (-93.86%)
Mutual labels:  nest, nestjs
mapped-types
Configuration module for Nest framework (node.js) 🐺
Stars: ✭ 192 (-30.69%)
Mutual labels:  nest, nestjs
necord
🤖 A module for creating Discord bots using NestJS, based on Discord.js
Stars: ✭ 77 (-72.2%)
Mutual labels:  nest, nestjs
nx-ng-nest-universal
Nx Workspace with a seperated Nest App for Angular Universal SSR.
Stars: ✭ 32 (-88.45%)
Mutual labels:  nest, nestjs
blog3.0
博客V3.0 目前使用的技术(Nuxtjs + Nestjs + Vue + Element ui + vuetify),存储(MongoDB + Redis + COS)
Stars: ✭ 37 (-86.64%)
Mutual labels:  nest, nestjs
server-next
😎 The next generation of RESTful API service and more for Mix Space, powered by @nestjs.
Stars: ✭ 43 (-84.48%)
Mutual labels:  nest, nestjs
Nest-Js-Boiler-Plate
Nest Js Boilerplate with JWT authentication, CRUD functions and payment gateways.
Stars: ✭ 14 (-94.95%)
Mutual labels:  nest, nestjs
nestjs-toolbox
The repository contains a suite of components and modules for Nest.js
Stars: ✭ 166 (-40.07%)
Mutual labels:  nest, nestjs
nest-typed-config
Intuitive, type-safe configuration module for Nest framework ✨
Stars: ✭ 47 (-83.03%)
Mutual labels:  nest, nestjs
axios
Axios module for Nest framework (node.js) 🗂
Stars: ✭ 95 (-65.7%)
Mutual labels:  nest, nestjs
nestlogger
Logger library for NestJs services
Stars: ✭ 28 (-89.89%)
Mutual labels:  nest, nestjs
azure-storage
Azure Storage module for Nest framework (node.js) ☁️
Stars: ✭ 71 (-74.37%)
Mutual labels:  nest, nestjs
Firstsight
前后端分离,服务端渲染的个人博客,基于 Nodejs、 Vue、 Nuxt、Nestjs、PostgreSQL、Apollo
Stars: ✭ 19 (-93.14%)
Mutual labels:  nest, nestjs
mom
Proof of concept for Message-Oriented-Middleware based architecture.
Stars: ✭ 39 (-85.92%)
Mutual labels:  nest, nestjs
nestjs-cookie-session
Idiomatic Cookie Session Module for NestJS. Built on top of `cookie-session` 😻
Stars: ✭ 35 (-87.36%)
Mutual labels:  nest, nestjs

Nest Logo

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

NPM Version Package License NPM Downloads Discord Backers on Open Collective Sponsors on Open Collective

Description

This module contains integrated healthchecks for Nest.

Installation

@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

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.
// 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.
// 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.

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

License

Nest is MIT licensed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].