mirror of
https://github.com/bumi/lntip
synced 2025-06-16 17:55:35 +00:00
Respect PORT environment variable
this makes it easier to run on PaaS as heroku
This commit is contained in:
parent
89ecea4d4a
commit
f79fb1747f
6
lnme.go
6
lnme.go
@ -141,7 +141,11 @@ func main() {
|
|||||||
return c.JSON(http.StatusOK, "pong")
|
return c.JSON(http.StatusOK, "pong")
|
||||||
})
|
})
|
||||||
|
|
||||||
e.Logger.Fatal(e.Start(":" + cfg.String("port")))
|
port := cfg.String("port")
|
||||||
|
if os.Getenv("PORT") != "" {
|
||||||
|
port = os.Getenv("PORT")
|
||||||
|
}
|
||||||
|
e.Logger.Fatal(e.Start(":" + port))
|
||||||
}
|
}
|
||||||
|
|
||||||
func LoadConfig() *koanf.Koanf {
|
func LoadConfig() *koanf.Koanf {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user