NestJS bootstrap: NestFactory.create() scans the module graph, builds the DI container, instantiates all singletons, fires OnModuleInit hooks (depth-first), fires OnApplicationBootstrap hooks, then starts the HTTP server. On shutdown: OnModuleDestroy, BeforeApplicationShutdown, then OnApplicationShutdown fire in order.