From 9d5d130038ed90564c3acfb2fd2ff64e3d7b0bd9 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Mon, 9 Aug 2021 21:11:52 -0400 Subject: Fix up cli. Continue fixing up the library and web app. Initial API spec --- cmd/web/main.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'cmd/web/main.go') diff --git a/cmd/web/main.go b/cmd/web/main.go index 20c3506..fdefa1b 100644 --- a/cmd/web/main.go +++ b/cmd/web/main.go @@ -30,7 +30,7 @@ var ( func main() { fl := flag.NewFlagSet("steam-export", flag.ExitOnError) debug := fl.Bool("d", false, "Print line numbers in log") - fl.StringVar(&Listen, "l", Listen, "What address do we listen on?") + fl.StringVar(&Listen, "l", Listen, "What address/port do we listen on?") fl.StringVar(&DefaultLib, "L", DefaultLib, "Full path to default library") fl.StringVar(&isLocalCIDR, "t", isLocalCIDR, "Trusted CIDRs for additional controls, seperated by commas") @@ -40,6 +40,7 @@ func main() { localFS := fl.String("fs", "", "If not empty the local path to use instead of the "+ "embedded templates and /static directory.") + noStartBrowser := fl.Bool("nobrowser", false, "If supplied, do not start the browser") fl.Parse(os.Args[1:]) if *debug { @@ -80,8 +81,10 @@ func main() { continue } - // Not using 'localhost' due to the way windows listens by default - startBrowser("http://127.0.0.1" + Listen) + if !*noStartBrowser { + // Not using 'localhost' due to the way windows listens by default + startBrowser("http://127.0.0.1" + Listen) + } err = s.Serve(l) if err != nil { -- cgit v1.2.3