clap-port-flag
clap-port-flag copied to clipboard
Consider --bind rather than --port/--address
I realise I'm going against a lot of prior server CLI design, but I much prefer a more descriptive command line argument than the normal --port
argument. A design that I've used in the past is
BIND_ADDRESS=127.0.0.1:5476
--bind 127.0.0.1:5476
which can reuse SocketAddr::from_str
for parsing.