From e755cc4b45356b0484eb9254b4a0647cdca1591e Mon Sep 17 00:00:00 2001 From: Serguey Parkhomovsky Date: Sat, 21 Mar 2026 11:29:28 -0700 Subject: Add bind arg and better error handling --- README.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index e598e7d..7d463a3 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,27 @@ Or directly: cargo run ``` -The server listens on `0.0.0.0:3000`. +By default the server listens on `0.0.0.0:3000` and reads config from `config.toml`. + +## CLI Arguments + +| Argument | Default | Description | +|----------|---------|-------------| +| `--config ` | `config.toml` | Path to the configuration file | +| `--bind ` | `0.0.0.0:3000` | Address to bind the HTTP server to | + +Examples: + +```sh +# Use a custom config file +./target/release/printstats --config /etc/printstats/config.toml + +# Listen on a different address/port +./target/release/printstats --bind 127.0.0.1:8080 + +# Both at once +./target/release/printstats --config /etc/printstats/config.toml --bind 127.0.0.1:8080 +``` ## API -- cgit v1.2.3