Application#
static configure(): ApplicationBuilderbootstrap(): Promise<void>shutdown(): Promise<void>static shutdown(): Promise<void>
The instance method shuts down the providers belonging to the active application stored in the global runtime. Prefer the instance method when you composed a custom application.
ApplicationBuilder#
use(provider: ProviderEntry): thiswith(provider: ProviderEntry): thiswithProviders(providers: ProviderEntry[]): thiscreate(): Application
ProviderEntry can be a ServiceProvider instance, a subclass constructor, or a callback receiving the container and returning a provider. withPlugins, withMail, withCommunication, withSettings and withMigrations are added by their respective package composition modules; they are not all base-kernel methods.
Lifecycle order#
- Base
KernelServiceProvideris added. - All provider
register()methods run in registration order. - All provider
boot()methods run in registration order. system:readyis published after successful initialization.- On shutdown, provider
shutdown()hooks run in reverse order, thensystem:stopis attempted.
Bootstrap is deduplicated globally and skips browser execution, the Next.js production build phase and SKIP_VEAP_INIT=true. Keep the composition root server-only and make any initialization side effects safe for the deployment lifecycle.