From e2fff3a30ddc5f3263417819f01ecdb4dcb88abc Mon Sep 17 00:00:00 2001 From: DutchEllie Date: Sat, 14 May 2022 18:31:43 +0200 Subject: [PATCH] Oh right, after browser --- src/main.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main.go b/src/main.go index 194639f..dce4745 100644 --- a/src/main.go +++ b/src/main.go @@ -21,10 +21,6 @@ var ( ) func main() { - ApiURL = os.Getenv("APIURL") - if ApiURL == "" { - log.Fatalln("Unable to get API URL from environment variables!") - } homepage := NewHomepage() aboutpage := NewAboutPage() galaxiespage := NewGalaxiesPage() @@ -44,6 +40,11 @@ func main() { // It exits immediately on the server side app.RunWhenOnBrowser() + ApiURL = os.Getenv("APIURL") + if ApiURL == "" { + log.Fatalln("Unable to get API URL from environment variables!") + } + icon := &app.Icon{ Default: "/web/static/images/icon-small.png", Large: "/web/static/images/icon.png",