Initializes the application by setting up the necessary services, middlewares, and controllers.
The Express application instance to be used.
The Node.js process instance for handling system-level events.
A promise that resolves once the application initialization is complete.
Method that is triggered when the component or service is being destroyed. It performs necessary cleanup operations, such as shutting down ongoing processes.
Does not return a value.
Shuts down the application gracefully by stopping all instances that implement the onDestroy method and removing all process interrupt listeners. Finally, it exits the process.
This method does not return any value.
Application class serves as the main entry point to initialize and manage the server application lifecycle. It includes the initialization of services, middleware, and routes, as well as handling graceful shutdowns.