diff options
Diffstat (limited to 'cmd/ponzu/main.go')
-rw-r--r-- | cmd/ponzu/main.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cmd/ponzu/main.go b/cmd/ponzu/main.go index ebcbbad..4ae3bcc 100644 --- a/cmd/ponzu/main.go +++ b/cmd/ponzu/main.go @@ -291,7 +291,14 @@ func main() { tls.Enable() } - log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", port), nil)) + // save the port the system is listening on so internal system can make + // HTTP api calls while in dev or production w/o adding more cli flags + err := db.PutConfig("http_port", fmt.Sprintf("%d", port)) + if err != nil { + log.Fatalln("System failed to save config. Please try to run again.") + } + + log.Fatalln(http.ListenAndServe(fmt.Sprintf(":%d", port), nil)) case "": fmt.Println(usage) |