diff options
author | Feuerfuchs <git@feuerfuchs.dev> | 2019-11-17 10:22:55 +0100 |
---|---|---|
committer | Feuerfuchs <git@feuerfuchs.dev> | 2019-11-17 10:22:55 +0100 |
commit | 8ea9f1433b070f748f23e187a4a688162640c574 (patch) | |
tree | d6517705321a32dfbf24ea85830ea1b5574cde10 /cmd | |
parent | Report template errors, add support for start page (diff) | |
download | gopherproxy-8ea9f1433b070f748f23e187a4a688162640c574.tar.gz gopherproxy-8ea9f1433b070f748f23e187a4a688162640c574.tar.bz2 gopherproxy-8ea9f1433b070f748f23e187a4a688162640c574.zip |
Allow custom path for startpage file
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/gopherproxy/main.go | 3 |
1 files changed, 2 insertions, 1 deletions
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 ( | |||
11 | // TODO: Allow config file and environment vars | 11 | // TODO: Allow config file and environment vars |
12 | // (opt -> env -> config -> default) | 12 | // (opt -> env -> config -> default) |
13 | bind = flag.String("bind", "0.0.0.0:8000", "[int]:port to bind to") | 13 | bind = flag.String("bind", "0.0.0.0:8000", "[int]:port to bind to") |
14 | startpagefile = flag.String("startpage-file", "startpage.txt", "Default page to display if no URL is specified") | ||
14 | robotsfile = flag.String("robots-file", "robots.txt", "robots.txt file") | 15 | robotsfile = flag.String("robots-file", "robots.txt", "robots.txt file") |
15 | robotsdebug = flag.Bool("robots-debug", false, "print output about ignored robots.txt") | 16 | robotsdebug = flag.Bool("robots-debug", false, "print output about ignored robots.txt") |
16 | vipsconcurrency = flag.Int("vips-concurrency", 1, "Concurrency level of libvips") | 17 | vipsconcurrency = flag.Int("vips-concurrency", 1, "Concurrency level of libvips") |
@@ -20,5 +21,5 @@ func main() { | |||
20 | flag.Parse() | 21 | flag.Parse() |
21 | 22 | ||
22 | // Use a config struct | 23 | // Use a config struct |
23 | log.Fatal(gopherproxy.ListenAndServe(*bind, *robotsfile, *robotsdebug, *vipsconcurrency)) | 24 | log.Fatal(gopherproxy.ListenAndServe(*bind, *startpagefile, *robotsfile, *robotsdebug, *vipsconcurrency)) |
24 | } | 25 | } |