aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2024-12-29 08:50:47 +0800
committerRunxi Yu <me@runxiyu.org>2024-12-29 08:50:47 +0800
commitd04d8362945d39add4515db0fab22699f207af54 (patch)
tree3080f6f9cb484f9e6ebe7b564dfc6fce4a13a57d /main.go
parentRemove Nix stuff for now (diff)
downloadlegitrx-master.tar.gz
legitrx-master.tar.zst
legitrx-master.zip
Use single config value for listen addrHEADmaster
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/main.go b/main.go
index f02a8a8..b4f0785 100644
--- a/main.go
+++ b/main.go
@@ -2,7 +2,6 @@ package main
import (
"flag"
- "fmt"
"log"
"net/http"
@@ -30,7 +29,5 @@ func main() {
}
mux := routes.Handlers(c)
- addr := fmt.Sprintf("%s:%d", c.Server.Host, c.Server.Port)
- log.Println("starting server on", addr)
- log.Fatal(http.ListenAndServe(addr, mux))
+ log.Fatal(http.ListenAndServe(c.Server.Addr, mux))
}