Which decorator is associated with removing resources in RESTful APIs?
@Post()
@Put()
@Get()
@Delete()
Which of these features is NOT a primary advantage of using NestJS?
Directly renders dynamic user interfaces in the browser
Provides a command-line interface (CLI) for easy project setup
Encourages code organization through modules and providers
Leverages TypeScript for improved code structure and maintainability
What design pattern does NestJS heavily rely on for structuring code?
Factory Method
Dependency Injection
Singleton
Observer
Which decorator is used to define a basic GET route in NestJS?
@Path()
@Route()
Which decorator is used to define a controller in NestJS?
@Injectable()
@Module()
@Controller()
@Component()
Which decorator is used to mark a class as a provider in NestJS?
@Service()
What is the role of the 'HttpException' class in NestJS exception handling?
It's a base class for creating custom exceptions with HTTP status codes.
It's an interface for defining the structure of exception objects.
It's a decorator for marking methods that handle HTTP exceptions.
It's a module for configuring global exception handling.
What is the order of execution for middleware applied at the controller and route level in NestJS?
Controller-level middleware executes first, followed by route-level middleware.
The order can be controlled using a priority setting.
The order of execution is undefined.
Route-level middleware executes first, followed by controller-level middleware.
Which programming language forms the foundation of NestJS?
Python
Ruby
JavaScript/TypeScript
Java
What is the purpose of the useFactory property in a FactoryProvider?
useFactory
FactoryProvider
To define a function that creates and returns an instance of the provider.
To specify the class that the factory function should return.
To configure the lifecycle hooks of the provider.
To provide a static value for the provider.