Put in order · NestJS course · Module 6: Error Handling and Monitoring

Lifecycle Hooks Order During Shutdown

Order the NestJS lifecycle hooks in their execution order during application shutdown

Items to put in order

  • BeforeApplicationShutdown - waiting for active operations
  • OnApplicationShutdown - final resource cleanup
  • OnModuleDestroy - module resource cleanup

You can check the correct answer by solving this task in the CodeWorlds game.