carsten-wenderdel / wildbg

Backgammon engine based on neural networks
https://wildbg.shuttleapp.rs/swagger-ui/
Apache License 2.0
18 stars 5 forks source link

Make port and server address configurable #23

Closed carsten-wenderdel closed 5 months ago

carsten-wenderdel commented 9 months ago

Right now when cargo run is executed, the server is started bound to address 0.0.0.0 and port 8080. Those two values should be configurable via command line arguments.

Changing the port would allow two instances running on the same machine.

Changing the address would allow supporting IPv6 or limiting connections to localhost.

Maybe the library clap could be used.