about summary refs log tree commit diff stats
path: root/internal/server/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/server/server.go')
-rw-r--r--internal/server/server.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/server/server.go b/internal/server/server.go
index d13d031..77163d3 100644
--- a/internal/server/server.go
+++ b/internal/server/server.go
@@ -6,6 +6,7 @@ import (
 	"log/slog"
 	"net"
 	"net/http"
+	"searchix/internal/config"
 	"time"
 
 	"github.com/pkg/errors"
@@ -15,12 +16,12 @@ type Server struct {
 	*http.Server
 }
 
-func New(runtimeConfig *Config) (*Server, error) {
-	mux, err := NewMux(runtimeConfig)
+func New(conf *config.Config, liveReload bool) (*Server, error) {
+	mux, err := NewMux(conf, liveReload)
 	if err != nil {
 		return nil, err
 	}
-	listenAddress := net.JoinHostPort(runtimeConfig.ListenAddress, runtimeConfig.Port)
+	listenAddress := net.JoinHostPort(conf.Web.ListenAddress, conf.Web.Port)
 
 	return &Server{
 		&http.Server{