Saxonberg Server API
    Preparing search index...
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Run the boot sequence in dependency order. Every step must complete before the next begins; any failure throws and stops boot.

      Sequence:

      1. Mongo connect — every later step touches PM.

      2. Seed templates from disk into domain (idempotent — existing docs are left alone). Runs FIRST after connect because PM.loadHooks below clones the DomainHook template out of domain, and the bootstrap manifest may reference other seeded templates too.

      3. Load PM hooks (folder/leaf invariant on Collections.Domain, etc.) — clones the seeded hook templates and registers them with the persistence pipeline. Seeds must exist before this runs.

        Controllers are not pre-loaded; dispatch clones a fresh one per command via StuffApi.clone('/obj/command/<Name>').

      4. Preload command YAMLs and resolve each validators: [...] spec into a live function. Validators are inert until this runs (runValidators early-returns on absent _resolvedValidators), so this MUST happen before the server accepts traffic.

      5. Bootstrap runtime instances from the engine manifest. All prior steps must be complete; failures here prevent boot.

      Parameters

      Returns Promise<void>

    • Graceful-shutdown counterpart to run(). Owns the backend-layer teardown that must run before the process exits — currently the world-clock snapshot so the next boot resumes continuously. Invoked from Server.stop(); kept here (not in services/) so transport code stays free of engine concerns.

      Returns Promise<void>