diff --git a/main.go b/main.go index d954f17..0f0be45 100644 --- a/main.go +++ b/main.go @@ -22,6 +22,10 @@ var MaxRequestsPerMessage int func main() { MaxRequestsPerMessage, _ = strconv.Atoi(os.Getenv("STAPPA_MAXREQ")) + bind := os.Getenv("STAPPA_BIND") + if bind == "" { + bind = ":8080" + } // Set default maxreq if MaxRequestsPerMessage < 1 { @@ -30,7 +34,7 @@ func main() { api = tg.MakeAPIClient(os.Getenv("STAPPA_TOKEN")) api.SetWebhook(os.Getenv("STAPPA_WEBHOOK")) - api.HandleWebhook(os.Getenv("STAPPA_BIND"), os.Getenv("STAPPA_PATH"), webhook) + api.HandleWebhook(bind, os.Getenv("STAPPA_PATH"), webhook) } type CardFaceFlipPics struct {