NestJS · Senior · Question 54 of 75

What's the difference between onModuleInit and onApplicationBootstrap?

Explanation

Use onApplicationBootstrap for work that needs the whole app, like warming caches that use several modules.

Further reading

Problem with a question

NestJS · Senior · question 54

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