What interface must a class implement to act as an Interceptor in NestJS?
HttpInterceptor
ResponseInterceptor
NestInterceptor
RequestInterceptor
Which of the following is NOT a valid scope for a provider in NestJS?
@Scoped()
@Singleton()
@Transient()
@RequestScoped()
What is the primary function of middleware in NestJS?
To render dynamic views on the server.
To handle database operations.
To intercept and modify incoming requests and outgoing responses.
To define API routes.
Inside an Interceptor's intercept method, what object allows you to modify the response?
intercept
next.handle()
interceptor.transform()
ctx.response
ctx.request
Which decorator is associated with removing resources in RESTful APIs?
@Delete()
@Post()
@Get()
@Put()
What is the purpose of dependency injection in NestJS?
To manage database connections.
To handle errors gracefully.
To provide a mechanism for creating and injecting dependencies into classes.
To define the application's routing logic.
Which interface does a custom exception filter in NestJS need to implement?
Injectable
HttpException
CanActivate
ExceptionFilter
What are the building blocks of a NestJS application called?
Services
Controllers
Components
Modules
After installing the NestJS CLI, what command is used to initiate a new NestJS project?
nestjs create-app my-app
create-react-app my-nestjs-project
nest new project-name
npm init nestjs-app
What is the purpose of the imports array in a NestJS module definition?
imports
To include providers that are specific to the module.
To import other modules, making their exported components available within the current module.
To import external JavaScript libraries.
To define the routes handled by the module.