Get the port from the json config
All checks were successful
Build and Push Docker Image / build (push) Successful in 5m53s

This commit is contained in:
2026-06-02 22:08:47 +02:00
parent a2d8c5c156
commit 8f1e292995
2 changed files with 3 additions and 2 deletions

View File

@@ -7,6 +7,7 @@ import (
type Config struct {
DB_URL string `json:"db_url"`
LISTEN_ON string `json:"listen_on"`
TRUSTED_PROXIES []string `json:"trusted_proxies"`
OTLP_ENDPOINT string `json:"otlp_endpoint"`
}

View File

@@ -74,12 +74,12 @@ func main() {
// Use h2c so we can serve HTTP/2 without TLS.
p.SetUnencryptedHTTP2(true)
s := http.Server{
Addr: ":3001",
Addr: conf.LISTEN_ON,
Handler: instrumentedHandler,
Protocols: p,
}
slog.Info("Starting server on :3001")
slog.Info("Starting server on " + conf.LISTEN_ON)
if err := s.ListenAndServe(); err != nil {
slog.Error("Server failed", slog.String("err", err.Error()))
}