-
-
Notifications
You must be signed in to change notification settings - Fork 104
Expand file tree
/
Copy pathapp.module.ts
More file actions
26 lines (25 loc) · 750 Bytes
/
app.module.ts
File metadata and controls
26 lines (25 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { Module } from '@nestjs/common';
import { PeopleController } from './people/people.controller';
import { StarshipsController } from './starships/starships.controller';
import { HttpExceptionFilter } from './http-exception.filter';
import { APP_FILTER, APP_INTERCEPTOR, APP_PIPE } from '@nestjs/core';
import { ZodValidationPipe, ZodSerializerInterceptor } from 'nestjs-zod';
@Module({
imports: [],
controllers: [PeopleController, StarshipsController],
providers: [
{
provide: APP_PIPE,
useClass: ZodValidationPipe,
},
{
provide: APP_INTERCEPTOR,
useClass: ZodSerializerInterceptor,
},
{
provide: APP_FILTER,
useClass: HttpExceptionFilter,
},
]
})
export class AppModule {}