Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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 {