mirror of
https://github.com/bumi/lntip
synced 2026-07-17 06:17:06 +00:00
Respect PORT environment variable
this makes it easier to run on PaaS as heroku
This commit is contained in:
@@ -141,7 +141,11 @@ func main() {
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user