NestJS · Junior · Question 15 of 75
What is the role of a controller?
- 1Store data in the database
- ✓Correct answer: Receive HTTP requests, read parameters and return a response, delegating business logic to services
- 3Render the front end
Explanation
Keep controllers thin: map the request to a service call and the result to a response.