diff options
-rw-r--r-- | cmd/ponzu/main.go | 2 | ||||
-rw-r--r-- | system/tls/enable.go | 4 | ||||
-rw-r--r-- | system/tls/enabledev.go | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/cmd/ponzu/main.go b/cmd/ponzu/main.go index 3764984..09edcc0 100644 --- a/cmd/ponzu/main.go +++ b/cmd/ponzu/main.go @@ -173,7 +173,7 @@ func main() { // cannot run production HTTPS and development HTTPS together if devhttps { - fmt.Println("Enabling self-signed HTTPS...") + fmt.Println("Enabling self-signed HTTPS... [DEV]") tls.EnableDev() } else if https { fmt.Println("Enabling HTTPS...") diff --git a/system/tls/enable.go b/system/tls/enable.go index 5e16b92..77ff287 100644 --- a/system/tls/enable.go +++ b/system/tls/enable.go @@ -65,7 +65,7 @@ func setup() { } -// Enable runs the setup for creating or locating production certificates and +// Enable runs the setup for creating or locating production certificates and // starts the TLS server func Enable() { setup() @@ -76,5 +76,5 @@ func Enable() { } go log.Fatalln(server.ListenAndServeTLS("", "")) - fmt.Println("Server listening for HTTPS requests...") + fmt.Println("Server listening on :443 for HTTPS requests...") } diff --git a/system/tls/enabledev.go b/system/tls/enabledev.go index ea0a329..092701a 100644 --- a/system/tls/enabledev.go +++ b/system/tls/enabledev.go @@ -1,6 +1,7 @@ package tls import ( + "fmt" "log" "net/http" "os" @@ -24,8 +25,7 @@ func EnableDev() { cert := filepath.Join(vendorPath, "devcerts", "cert.pem") key := filepath.Join(vendorPath, "devcerts", "key.pem") - err = http.ListenAndServeTLS(":10443", cert, key, nil) - if err != nil { - log.Fatalln(err) - } + + go log.Fatalln(http.ListenAndServeTLS(":10443", cert, key, nil)) + fmt.Println("Server listening on :10443 for HTTPS requests... [DEV]") } |