@enoviah/nest-health
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

Nest health module

The purpose of this module is to be used with nest rest api in order to open a /health route This route has 2 objectifs :

  • Expose a /health route
  • Turn on tracking of api status by eno-health-apo

You need to import the module in any nest api related to enoviah.

Installation

npm install @enoviah/nest-health

Configuration

In order to enable the health module, you will need to import the module into a nest module :

import { HealthModule, HealthService } from '@enoviah/nest-health';

@Module({
  imports: [HealthModule],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {
  constructor(private healthService: HealthService) {
   // this is optional but we encourage you to define service name
    this.healthService.healthStatus.service = 'Health api';
  }
}

That's all, you can deploy your api

Build & Usage

you can manually build & use this package without npm install. First step is to dpwnload this repo. Then, we install dependencies & run

npm run build

If you want yo use the build result as a local npm package, just run

npm link

Next, in your nest api, run:

npm link @enoviah/nest-health

and that's it

Readme

Keywords

Package Sidebar

Install

npm i @enoviah/nest-health

Weekly Downloads

1

Version

0.0.1

License

ISC

Unpacked Size

11.8 kB

Total Files

19

Last publish

Collaborators

  • maddoctor