feat: allow restrict Pomodoro via password
- introduce password flag in server command line options - update clientCommand model - add password requirement for controlling the Pomodoro timer - document password in README
This commit is contained in:
parent
8deb642a7e
commit
f991ba885d
5 changed files with 38 additions and 26 deletions
|
@ -14,12 +14,14 @@ func Start() {
|
|||
// Define CLI flags for ListenAddress and ListenPort
|
||||
listenAddress := flag.String("listenAddress", shared.DefaultServerConfig.ListenAddress, "IP address to listen on")
|
||||
listenPort := flag.Int("listenPort", shared.DefaultServerConfig.ListenPort, "Port to listen on")
|
||||
password := flag.String("password", "", "Control password for pomodoro session (optional)")
|
||||
flag.Parse()
|
||||
|
||||
serverConfig := models.GoTomatoServerConfig{
|
||||
ListenAddress: *listenAddress,
|
||||
ListenPort: *listenPort,
|
||||
}
|
||||
shared.PomodoroPassword = *password
|
||||
|
||||
listen := fmt.Sprintf("%s:%d", serverConfig.ListenAddress, serverConfig.ListenPort)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue