Spins up a quick-and-clean HTTP server for development and testing purposes.
With no options specified, this command listens on a random available port and answers HTTP requests with
an empty 200 response. The listen address can be customized with the --listen flag and will always be
printed to stdout. If the listen address includes a port range, multiple servers will be started.
If a final, unnamed argument is given, it will be treated as a status code (same as the --status flag) if
it is a 3-digit number. Otherwise, it is used as the response body (same as the --body flag). The
--status and --body flags will always override this argument (for example, to write a body that literally
says "404" but with a status code of 200, do '--status 200 404').
A body may be given in 3 ways: a flag, a final (and unnamed) argument to the command, or piped to stdin
(if flag and argument are unset). Limited template evaluation is supported on the body, with the
following variables:
{{.N}} The server number (useful if using a port range)
{{.Port}} The listener port
{{.Address}} The listener address
(See the docs for the text/template package in the Go standard library for information about using
templates: https://pkg.go.dev/text/template)
Access/request logging and more verbose debug logging can also be enabled.
Response headers may be added using the --header flag for each header field.