diff options
-rw-r--r-- | cmd/ponzu/main.go | 3 | ||||
-rw-r--r-- | system/tls/enabledev.go | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/cmd/ponzu/main.go b/cmd/ponzu/main.go index b68065c..b122f7f 100644 --- a/cmd/ponzu/main.go +++ b/cmd/ponzu/main.go @@ -130,7 +130,8 @@ func main() { } serve := exec.Command("./ponzu-server", - fmt.Sprintf("--port=%d --httpsport=%d", port, httpsport), + fmt.Sprintf("--port=%d", port), + fmt.Sprintf("--httpsport=%d", httpsport), addTLS, "serve", services, diff --git a/system/tls/enabledev.go b/system/tls/enabledev.go index 3550fc0..48a8961 100644 --- a/system/tls/enabledev.go +++ b/system/tls/enabledev.go @@ -5,6 +5,8 @@ import ( "net/http" "os" "path/filepath" + + "github.com/bosssauce/ponzu/system/db" ) // EnableDev generates self-signed SSL certificates to use HTTPS & HTTP/2 while @@ -25,5 +27,6 @@ func EnableDev() { cert := filepath.Join(vendorPath, "devcerts", "cert.pem") key := filepath.Join(vendorPath, "devcerts", "key.pem") - log.Fatalln(http.ListenAndServeTLS(":10443", cert, key, nil)) + port := db.ConfigCache("https_port") + log.Fatalln(http.ListenAndServeTLS(":"+port, cert, key, nil)) } |