package main import ( "flag" "log" port "git.vulpes.one/Feuerfuchs/port/internal/port" ) 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") ) func main() { flag.Parse() // Use a config struct log.Fatal(port.ListenAndServe(*bind, *startpagefile, *robotsfile, *robotsdebug, *vipsconcurrency)) }