From 584c1df91a9ad5adbc526ea745f8f907bf598588 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Thu, 4 Apr 2024 12:13:23 +0200 Subject: [PATCH] Added port configuration --- App.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/App.go b/App.go index 0b9fd98..ecc18b8 100644 --- a/App.go +++ b/App.go @@ -107,7 +107,13 @@ func (app *App) Run() { return render(ctx, head, content) }) - s.Run(":8080") + address := os.Getenv("LISTEN") + + if address == "" { + address = ":8080" + } + + s.Run(address) } func load(path string) string {