The running proxy: routes table + Finch pool + Bandit listener, one supervision tree started by the CLI (or embedded by a host app).
On start it records {port} in the state file so clients
(Cherrypicker.register/2, the CLI verbs) can find the control API
without configuration; the file is removed on clean shutdown.
The default port is 80 — that is what makes http://myapp.localhost
pretty — but binding 80 needs privileges on Unix, so :port is
honest configuration, not a hidden sudo. port: 0 binds an ephemeral
port, which the state file then advertises.
Summary
Functions
Returns a specification to start this module under a supervisor.
The port the proxy actually bound (pass port: 0 for ephemeral).
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec port() :: :inet.port_number()
The port the proxy actually bound (pass port: 0 for ephemeral).
@spec start_link(keyword()) :: Supervisor.on_start()