From b0b5027ee9d501eec378c0137aa1d1bc965e7d86 Mon Sep 17 00:00:00 2001 From: stuzer05 Date: Wed, 27 Mar 2024 21:22:51 +0200 Subject: [PATCH] Refactor --- main.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 303ba75..4443920 100644 --- a/main.go +++ b/main.go @@ -191,11 +191,18 @@ func main() { log.Fatalf("Error loading .env file") } + // test config read + _, err = ReadConfig(os.Getenv("CONFIG_PATH")) + if err != nil { + fmt.Println("cannot read config - " + err.Error()) + return + } + // set webhook http.HandleFunc("/webhook", handleWebhook) // listen server - fmt.Println("Webhook server listening on :3021") + fmt.Println("Webhook server listening on :3021") // @todo make env err = http.ListenAndServe(":3021", nil) if err != nil { panic(err.Error())