diff options
author | Anirudh Oppiliappan <x@icyphox.sh> | 2022-12-12 22:58:23 +0530 |
---|---|---|
committer | Anirudh Oppiliappan <x@icyphox.sh> | 2022-12-12 22:58:23 +0530 |
commit | 462c7ddc70f7c4da9515298439246f3b40b244f5 (patch) | |
tree | cbb11e717a3f3ffb63fb7e802429adbbba596510 /main.go | |
parent | 60e1092dbcfacb28b30d052b0f73d2249cd63a9d (diff) | |
download | legit-462c7ddc70f7c4da9515298439246f3b40b244f5.tar.gz legit-462c7ddc70f7c4da9515298439246f3b40b244f5.tar.bz2 legit-462c7ddc70f7c4da9515298439246f3b40b244f5.zip |
config: server host and port
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2,6 +2,7 @@ package main import ( "flag" + "fmt" "log" "net/http" @@ -20,5 +21,7 @@ func main() { } mux := routes.Handlers(c) - log.Fatal(http.ListenAndServe(":5555", mux)) + addr := fmt.Sprintf("%s:%d", c.Server.Host, c.Server.Port) + log.Println("starting server on", addr) + log.Fatal(http.ListenAndServe(addr, mux)) } |