Factory Deep Dive
The Factory is the entry point for server instantiation. It orchestrates the initial loading of the environment and the creation of the server class instance.
Methods
create(serverClass, config?)
- Purpose: Instantiates the provided server class and triggers the initialization sequence.
- Logic: It ensures that the provided class extends
CoreServer. If a config object is passed, it pre-populates theConfigService. It then calls theinit()method of the instantiated server to start the wiring of controllers, routes, and services.