Question · NestJS course · Module 6: Error Handling and Monitoring
Activating Shutdown Hooks
How do you activate listening for system signals (SIGTERM/SIGINT) in NestJS?
Answer options
- Add process.exit() in the controller
- Call app.enableShutdownHooks() in main.ts
- Install the @nestjs/shutdown package
- Add the --shutdown flag to npm start
You can check the correct answer by solving this task in the CodeWorlds game.