NestJS · Junior · Question 57 of 75
What does app.setGlobalPrefix('api') do?
- 1Renames the app to
api - ✓Correct answer: Adds
/apiin front of all routes - 3Moves the server to port
api
Explanation
You can exclude some routes, such as health checks, from the prefix with the exclude option.