aboutsummaryrefslogtreecommitdiff
path: root/cmd/web/main.go
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2021-08-09 21:11:52 -0400
committerMitchell Riedstra <mitch@riedstra.dev>2021-08-09 21:12:03 -0400
commit9d5d130038ed90564c3acfb2fd2ff64e3d7b0bd9 (patch)
treea95d63e240f0b63ffa4ff2ad3571fa45165b5708 /cmd/web/main.go
parentc202f2eca32e1ab2e313417168351df1c58ee062 (diff)
downloadsteam-export-9d5d130038ed90564c3acfb2fd2ff64e3d7b0bd9.tar.gz
steam-export-9d5d130038ed90564c3acfb2fd2ff64e3d7b0bd9.tar.xz
Fix up cli. Continue fixing up the library and web app. Initial API spec
Diffstat (limited to 'cmd/web/main.go')
-rw-r--r--cmd/web/main.go9
1 files changed, 6 insertions, 3 deletions
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 {