feat: add CLI flags to app

- implement command-line flags for listen address and port
- add usage section to README

🤖
This commit is contained in:
Sebastian Mark 2024-10-20 14:55:02 +02:00
parent 85923b4469
commit 0b2f83cd35
3 changed files with 17 additions and 7 deletions

View file

@ -8,6 +8,6 @@ type GoTomatoTimerConfig struct {
}
type GoTomatoServerConfig struct {
ListenAddress string `json:"listenAddress"`
ListenPort int `json:"listenPort"`
ListenAddress string `json:"listenAddress, default:"0.0.0.0"`
ListenPort int `json:"listenPort, default:8080"`
}