In JWT authentication, what does JWT stand for?
Just Write Tests
JavaScript Web Token
JSON Web Token
Java Web Token
What is a key advantage of using interceptors for cross-cutting concerns like logging and transformation in NestJS?
All of the above
Reduced boilerplate code in controllers and services
Improved code organization and separation of concerns
Enhanced performance and reduced request latency
What is the purpose of a Model in Mongoose?
To handle user authentication and authorization
To interact with a specific collection in the database based on a defined schema
To define a database connection string
To create and manage database migrations
Which of the following is NOT a built-in Pipe provided by NestJS?
ValidationPipe
ParseIntPipe
DefaultValuePipe
TransformationPipe
When creating a custom Pipe, which interface should your Pipe class implement?
IPipe
PipeTransform
DataTransformer
CustomPipe
What is the purpose of the 'ParseIntPipe' in NestJS?
To transform a numeric string into an integer.
To parse an object into a JSON string.
To convert a string value to a Boolean.
To validate the data type of an input parameter.
What is the difference between HttpException and a custom exception class in NestJS?
HttpException
HttpException is used for generic HTTP errors, while custom exceptions represent specific business logic errors.
HttpException must be caught by custom exception filters, while custom exceptions are handled automatically.
HttpException is deprecated and should always be replaced with custom exception classes.
There is no practical difference; both can be used interchangeably for error handling.
In NestJS, what is the primary mechanism for implementing an event-driven architecture?
Using HTTP requests and responses
Leveraging a message queue system like RabbitMQ
Directly calling methods between classes
Utilizing NestJS's built-in event emitter and listener system
What is a common approach to ensure data consistency when using CQRS and event-driven architecture in NestJS?
Implementing eventual consistency by updating read models asynchronously
Relying on the database's built-in transaction management system
Using two-phase commit transactions for command and event handling
Disabling caching mechanisms to guarantee real-time data consistency
In TypeORM, what is the purpose of an Entity?
To manage database connections
To define routes in a NestJS application
To handle HTTP requests
To define database tables and their columns