NestJS · Senior · Question 66 of 75

What does onApplicationShutdown(signal) receive and why is it useful?

Explanation

It runs after connections are closed by the HTTP server, as the last chance to flush logs or metrics.

Further reading

Problem with a question

NestJS · Senior · question 66

Test yourself

Take the NestJS · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz