Which HTTP method does the @Post() decorator handle?
@Post()
DELETE
POST
PUT
GET
What is the purpose of Providers in NestJS?
To handle routing and HTTP requests
To provide reusable logic and services that can be injected into other components
To render the user interface and manage view templates
To define database models and interact with the database
Which decorator is used to apply middleware to a specific route in NestJS?
@ApplyMiddleware()
@Middleware()
@UseMiddleware()
@Route()
What is NOT a benefit of using Dependency Injection in NestJS?
Improved code testability.
Better maintainability of code.
Increased code coupling.
Enhanced code reusability.
What is the purpose of the @Body() decorator?
@Body()
Accesses query parameters
Accesses route parameters
Accesses the entire request body
Accesses the request headers
What is the order of execution for middleware applied at the controller and route level in NestJS?
Route-level middleware executes first, followed by controller-level middleware.
Controller-level middleware executes first, followed by route-level middleware.
The order of execution is undefined.
The order can be controlled using a priority setting.
Which decorator is used to define a controller in NestJS?
@Module()
@Component()
@Injectable()
@Controller()
How are controllers related to modules in NestJS?
Controllers exist independently of modules.
Modules are defined within controllers.
Controllers and modules are unrelated concepts in NestJS.
Controllers are defined within modules, and their scope is limited to that module.
Which decorator allows you to access route parameters in NestJS?
@Query()
@Req()
@Param()