Set default bind
This commit is contained in:
parent
738695586e
commit
f3a447cb68
1 changed files with 5 additions and 1 deletions
6
main.go
6
main.go
|
@ -22,6 +22,10 @@ var MaxRequestsPerMessage int
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
MaxRequestsPerMessage, _ = strconv.Atoi(os.Getenv("STAPPA_MAXREQ"))
|
MaxRequestsPerMessage, _ = strconv.Atoi(os.Getenv("STAPPA_MAXREQ"))
|
||||||
|
bind := os.Getenv("STAPPA_BIND")
|
||||||
|
if bind == "" {
|
||||||
|
bind = ":8080"
|
||||||
|
}
|
||||||
|
|
||||||
// Set default maxreq
|
// Set default maxreq
|
||||||
if MaxRequestsPerMessage < 1 {
|
if MaxRequestsPerMessage < 1 {
|
||||||
|
@ -30,7 +34,7 @@ func main() {
|
||||||
|
|
||||||
api = tg.MakeAPIClient(os.Getenv("STAPPA_TOKEN"))
|
api = tg.MakeAPIClient(os.Getenv("STAPPA_TOKEN"))
|
||||||
api.SetWebhook(os.Getenv("STAPPA_WEBHOOK"))
|
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 {
|
type CardFaceFlipPics struct {
|
||||||
|
|
Loading…
Reference in a new issue