How to use the nest-raven.RavenModule.forRoot function in nest-raven

To help you get started, we’ve selected a few nest-raven examples, based on popular ways it is used in public projects.

github mentos1386 / lynx / src / modules / app.module.ts View on Github external
import { DemoModule } from './demo/demo.module';
import { TypeOrmModule } from '@nestjs/typeorm';
import { RavenInterceptor, RavenModule } from 'nest-raven';
import { APP_INTERCEPTOR } from '@nestjs/core';

@Module({
  imports: [
    LoggerModule, // Global
    AuthenticationModule, // Required for AuthMiddleware

    // Init TypeOrm
    TypeOrmModule.forRoot(),
    // Init Router
    RouterModule.forRoutes(appRoutes),
    // Init Raven
    RavenModule.forRoot(),

    UserModule,
    DemoModule,
  ],
  providers: [
    {
      provide: APP_INTERCEPTOR,
      useClass: RavenInterceptor({
        filters: [{
          type: HttpException, filter: (exception: HttpException) => 500 > exception.getStatus(),
        }],
      }),
    },
  ],
})
export class ApplicationModule implements NestModule {

nest-raven

Sentry Raven Module for Nest Framework

MIT
Latest version published 8 days ago

Package Health Score

81 / 100
Full package analysis