diff options
| author | Serguey Parkhomovsky <xindigo@gmail.com> | 2026-03-21 11:29:28 -0700 |
|---|---|---|
| committer | Serguey Parkhomovsky <xindigo@gmail.com> | 2026-03-21 11:31:00 -0700 |
| commit | e755cc4b45356b0484eb9254b4a0647cdca1591e (patch) | |
| tree | 32785f2740607cbec5a998619b24f0c41cae7d85 /README.md | |
| parent | 50a45092eab7f7f6c1f701bffe40226dcb6eeaf9 (diff) | |
Add bind arg and better error handling
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -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 |
