about summary refs log tree commit diff stats
path: root/serve/main.go
diff options
context:
space:
mode:
authorAlan Pearce2024-05-09 19:30:02 +0200
committerAlan Pearce2024-05-09 19:31:36 +0200
commitf42dfe7b5fd3d60c9558eb520d33c7c8fd1ba201 (patch)
tree58abf30e34b78fc66ac74cb768c770c3d251bb46 /serve/main.go
parent830e14f372fcff094448ac8528386ab381f6f35c (diff)
downloadsearchix-f42dfe7b5fd3d60c9558eb520d33c7c8fd1ba201.tar.lz
searchix-f42dfe7b5fd3d60c9558eb520d33c7c8fd1ba201.tar.zst
searchix-f42dfe7b5fd3d60c9558eb520d33c7c8fd1ba201.zip
feat: format server listen address as URL
Diffstat (limited to 'serve/main.go')
-rw-r--r--serve/main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/serve/main.go b/serve/main.go
index 9378de1..5c68cc5 100644
--- a/serve/main.go
+++ b/serve/main.go
@@ -4,6 +4,7 @@ import (
 	"fmt"
 	"log"
 	"log/slog"
+	"net/url"
 	"os"
 	"os/signal"
 	"sync"
@@ -56,7 +57,8 @@ func main() {
 		sErr <- sv.Start()
 	}()
 	if !runtimeConfig.InDevServer {
-		log.Printf("server listening on %s", sv.Addr)
+		url, _ := url.Parse("http://" + sv.Addr)
+		log.Printf("server listening on %s", url.String())
 	}
 
 	err = <-sErr