Search code examples
javaspring-bootheroku

Heroku error code H10 when Spring Boot app is deployed


I can't open my app in Heroku - I get error H10. When I run my app in Eclipse or use executable jar file - everything work well. Here is my code : GITHub Below is my log file: DropBox


Solution

  • You app is running on port 8080, but on Heroku it needs to bind to the environment variable $PORT. You can fix Spring to do this by adding the following to your application.properties:

    server.port=${PORT:8080}
    

    This will use $PORT if it's set, and default to 8080 if it's not.