Skip to content

validatePreviewPortRange

validatePreviewPortRange(__namedParameters): void

Defined in: src/config.ts:236

Hard-fail at startup if the configured preview port range overlaps either:

  • the HUD’s local listen port (a bind conflict), or
  • the HUD’s public served origin port (would lock out the HUD’s own requests once origin hardening is active, since its origin would look like a preview).

The range is [previewPortBase, previewPortBase + previewPortCount).

Throws an Error with a clear message on any overlap; returns void on success.

PreviewPortRangeParams

void