Set default bind

This commit is contained in:
Hamcha 2020-01-30 12:39:45 +01:00
parent 738695586e
commit f3a447cb68
Signed by: hamcha
GPG key ID: 44AD3571EB09A39E

View file

@ -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 {