Hwaro::Config::Options::ServeOptions
Constants
Where hwaro serve builds. A dedicated directory, NOT the
configured output_dir (issue #756): serve derives base_url from its
bind address, so its pages carry dev URLs (http://127.0.0.1:3000) —
sharing the output dir let a serve session silently poison a
previously deployable hwaro build, and hosting the leftover tree
leaked those dev links. Keep this directory out of version control
(alongside .hwaro_cache.json).
Constructors
Class methods
Host as it must appear inside a URL. An IPv6 literal has to be
bracketed (RFC 3986) — without this hwaro serve -b ::1 produced
http://::1:3000, which no browser can resolve, and baked that
string into every link, canonical and OG URL of the served site.
-b 0.0.0.0 / -b :: listen on every interface but are not an
address anything can connect TO: as the derived base_url they put
http://0.0.0.0:3000/… into every link, stylesheet and canonical
(unconnectable on Windows, meaningless from another device). Like an
empty host, they stand for "localhost" in URLs.
Instance methods
Custom response headers to inject during serve (from config.toml [serve.headers] + CLI --header)
Custom response headers to inject during serve (from config.toml [serve.headers] + CLI --header)