summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorSerguey Parkhomovsky <xindigo@gmail.com>2026-03-21 11:29:28 -0700
committerSerguey Parkhomovsky <xindigo@gmail.com>2026-03-21 11:31:00 -0700
commite755cc4b45356b0484eb9254b4a0647cdca1591e (patch)
tree32785f2740607cbec5a998619b24f0c41cae7d85 /README.md
parent50a45092eab7f7f6c1f701bffe40226dcb6eeaf9 (diff)
Add bind arg and better error handling
Diffstat (limited to 'README.md')
-rw-r--r--README.md22
1 files changed, 21 insertions, 1 deletions
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 <PATH>` | `config.toml` | Path to the configuration file |
+| `--bind <ADDR>` | `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