@rfprodz/backend-diagnostics

1.0.35 • Public • Published

backend-diagnostics

Diagnostics module for NestJS backends.

Developer commands reference

npx nx run tools:help --search backend-diagnostics:

Usage

Add to the root API module

...
@Module({
  ...
  imports: [
    ...
    HttpModule.registerAsync({
      useFactory: () => ({
        timeout: 10000,
        maxRedirects: 5,
      }),
    }),
    AppDiagnosticsModule.forRoot(),
    ...
  ],
  ...
})
export class AppApiModule {}

Add to the main.ts file

/**
 * Express server.
 */
const server: e.Express = e();

...

async function bootstrap(expressInstance: e.Express): Promise<INestApplication> {
  const app = await NestFactory.create(AppApiModule, new ExpressAdapter(expressInstance));
  app.useWebSocketAdapter(new WsAdapter(app));

  ...

  return app.init();
}

void bootstrap(server);

References

Package Sidebar

Install

npm i @rfprodz/backend-diagnostics

Weekly Downloads

2

Version

1.0.35

License

MIT

Unpacked Size

26.7 kB

Total Files

30

Last publish

Collaborators

  • rfprodz