feat: add server url parameter to cli

This commit is contained in:
Jose Luis Montañes Ojados
2026-01-28 15:20:53 +01:00
parent cb704c1b1f
commit a857c1a051
2 changed files with 11 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
package main
import (
"flag"
"fmt"
"os"
"time"
@@ -211,6 +212,11 @@ func fetchServices() tea.Msg {
}
func main() {
serverURL := flag.String("server", "http://localhost:8080", "URL of the EnvGuard server")
flag.Parse()
api.SetBaseURL(*serverURL)
user := os.Getenv("USER")
if user == "" {
user = "guest"