From 8ea9f1433b070f748f23e187a4a688162640c574 Mon Sep 17 00:00:00 2001 From: Feuerfuchs Date: Sun, 17 Nov 2019 10:22:55 +0100 Subject: Allow custom path for startpage file --- cmd/gopherproxy/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/gopherproxy/main.go b/cmd/gopherproxy/main.go index e84e978..6e6f48c 100644 --- a/cmd/gopherproxy/main.go +++ b/cmd/gopherproxy/main.go @@ -11,6 +11,7 @@ var ( // TODO: Allow config file and environment vars // (opt -> env -> config -> default) bind = flag.String("bind", "0.0.0.0:8000", "[int]:port to bind to") + startpagefile = flag.String("startpage-file", "startpage.txt", "Default page to display if no URL is specified") robotsfile = flag.String("robots-file", "robots.txt", "robots.txt file") robotsdebug = flag.Bool("robots-debug", false, "print output about ignored robots.txt") vipsconcurrency = flag.Int("vips-concurrency", 1, "Concurrency level of libvips") @@ -20,5 +21,5 @@ func main() { flag.Parse() // Use a config struct - log.Fatal(gopherproxy.ListenAndServe(*bind, *robotsfile, *robotsdebug, *vipsconcurrency)) + log.Fatal(gopherproxy.ListenAndServe(*bind, *startpagefile, *robotsfile, *robotsdebug, *vipsconcurrency)) } -- cgit v1.2.3-70-g09d2