Skip to main content

Server Structural Phase

Archibald uses an "Inversion of Control" pattern where the project implementation (e.g., templates/shop) extends the framework's base classes.

The Inheritance Model

  • ShopServer: Extends CoreServer. It overrides the init() method to register project-specific routes, controllers, and services.
  • RenderController: Extends Archibald's BaseController (or DefaultRenderController). It hooks into Hapi's lifecycle to handle global errors and trigger the project-specific RenderService.