Skip to content

Instantly share code, notes, and snippets.

@Vatsalya-singhi
Created March 27, 2025 18:33
Show Gist options
  • Save Vatsalya-singhi/f125059df71b95aa4a6caa81f0a690aa to your computer and use it in GitHub Desktop.
Save Vatsalya-singhi/f125059df71b95aa4a6caa81f0a690aa to your computer and use it in GitHub Desktop.
// main.ts
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { HttpExceptionFilter } from './http-exception.filter';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.useGlobalFilters(new HttpExceptionFilter()); // Apply globally
await app.listen(3000);
}
bootstrap();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment