I have developed a rest api using golang.I have pushed the repository to Heroku.I have also hosted a Mysql Server on the internet.The Go rest api connects to the Mysql Server and fetches and inserts data.
The application on heroku was working fine yesterday.However this morning I get this error on "heroku logs --tail": Web process failed to bind to $PORT within 60 seconds of launch
Here is the code for main.go:
package main
import (
"os"
"github.com/mingrammer/go-todo-rest-api-example/app"
"github.com/mingrammer/go-todo-rest-api-example/config"
)
func main() {
config := config.GetConfig()
app := &app.App{}
app.Initialize(config)
port, ok := os.LookupEnv("PORT")
if ok == false {
port = "3000"
}
app.Run(":"+port)
}