Add CLI args for broker address and port

This commit is contained in:
Ollo
2026-02-27 19:01:06 +01:00
parent 1771b8b0e2
commit 555c1d76c0
3 changed files with 22 additions and 3 deletions

View File

@@ -12,9 +12,14 @@ A simple Rust application that publishes messages to an MQTT broker.
## Usage
```bash
cargo run
cargo run -- --broker 192.168.1.100 --port 1883
```
### Arguments
- `broker`: MQTT broker address (default: `localhost`)
- `port`: MQTT broker port (default: `1883`)
## Configuration
Edit `src/main.rs` to customize: