Class: ApplicationFactory
Bootstraps and manages the full Aurora application lifecycle:
- Scans modules and builds the DI graph
- Instantiates controllers up front (to support lifecycle hooks)
- Binds controller events to the platform driver via EventBinder
Use ApplicationFactory.create to initialize and obtain the application instance.
Methods
close()
close(
signal?):Promise<void>
Shuts down the application and calls shutdown hooks.
Parameters
signal?
string
Returns
Promise<void>
get()
get<
T>(token):Promise<T>
Resolves an instance from the DI container.
Type Parameters
T
T
Parameters
token
Token<T>
The provider token or class
Returns
Promise<T>
start()
start():
Promise<void>
Starts the application and binds all controller event handlers.
Returns
Promise<void>
create()
staticcreate(rootModule,platformDriver):Promise<IApplication>
Bootstraps an Aurora application and returns its public interface.
Parameters
rootModule
The application's root module (entry point)
platformDriver
The platform driver for this runtime
Returns
Promise<IApplication>
A Promise resolving to the IApplication instance