This commit is contained in:
Illya Marchenko 2024-03-27 21:22:51 +02:00
parent 97afa8ba6d
commit b0b5027ee9
Signed by: stuzer05
GPG Key ID: A6ABAAA9268F9F4F

@ -191,11 +191,18 @@ func main() {
log.Fatalf("Error loading .env file") 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 // set webhook
http.HandleFunc("/webhook", handleWebhook) http.HandleFunc("/webhook", handleWebhook)
// listen server // listen server
fmt.Println("Webhook server listening on :3021") fmt.Println("Webhook server listening on :3021") // @todo make env
err = http.ListenAndServe(":3021", nil) err = http.ListenAndServe(":3021", nil)
if err != nil { if err != nil {
panic(err.Error()) panic(err.Error())