aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/main.go b/main.go
index eedff5e..18b73ff 100644
--- a/main.go
+++ b/main.go
@@ -4,7 +4,6 @@ import (
"context"
"flag"
"log/slog"
- "net/http"
"os"
"os/signal"
"time"
@@ -16,7 +15,6 @@ import (
)
func main() {
-
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, os.Kill)
defer stop()
if err := run(ctx); err != nil {
@@ -27,7 +25,7 @@ func main() {
func run(ctx context.Context) error {
var (
- configPath = flag.String("config", "config.example.scfg", "File path for the configuration file")
+ configPath = flag.String("config", "/etc/cerrado.scfg", "File path for the configuration file")
)
flag.Parse()
@@ -46,7 +44,7 @@ func run(ctx context.Context) error {
return err
}
- serverTask := worker.NewServerTask(&http.Server{Handler: handler, Addr: "0.0.0.0:8080"})
+ serverTask := worker.NewServerTask(configRepo.GetListenAddr(), handler)
pool := worker.NewTaskPool()
pool.AddTask("http-server", 5*time.Second, serverTask)