Controllers handle incoming HTTP requests and return responses. They are decorated with @Controller('route-prefix') and their methods use HTTP-method decorators like @Get(), @Post(), etc. Controllers are thin — they delegate business logic to providers/services.
A controller is responsible for handling incoming requests and returning responses to the client. It should remain thin and delegate actual business logic to services.
Map routes to handler methods using decorators.
Extract data from the request (params, query, body, headers).
Delegate logic to services.
Return the response (NestJS handles serialization automatically).