aboutsummaryrefslogtreecommitdiff
path: root/cmd/web/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/web/main.go')
-rw-r--r--cmd/web/main.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/cmd/web/main.go b/cmd/web/main.go
index da0bebd..7475478 100644
--- a/cmd/web/main.go
+++ b/cmd/web/main.go
@@ -14,9 +14,12 @@ import (
)
var (
+ // Version is overridden by the build script
Version = "Development"
- Logger = log.New(os.Stderr, "", log.LstdFlags)
- Listen = ":8899"
+ // Logger default logging to stderr
+ Logger = log.New(os.Stderr, "", log.LstdFlags)
+ // Listen address for the webserver
+ Listen = ":8899"
//go:embed static/*
embeddedStatic embed.FS
@@ -48,7 +51,7 @@ func main() {
r.Handle("/setLib", UnauthorizedIfNotLocal(http.HandlerFunc(a.HandleSetLib)))
r.Handle("/delete", UnauthorizedIfNotLocal(http.HandlerFunc(a.HandleDelete)))
r.Handle("/install", UnauthorizedIfNotLocal(http.HandlerFunc(a.HandleInstall)))
- r.HandleFunc("/steam-export-web.exe", serveSelf)
+ r.HandleFunc("/steam-export-web.exe", ServeSelf)
r.HandleFunc("/download/{game}", a.HandleDownload)
r.Handle("/status", UnauthorizedIfNotLocal(http.HandlerFunc(a.HandleStats)))
r.PathPrefix("/static").Handler(
@@ -72,7 +75,7 @@ func main() {
if err != nil {
panic(err)
}
- port += 1
+ port++
Listen = fmt.Sprintf("%s:%d", parts[0], port)