Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 832
Marcin Avatar asked Jun 23 '26 23:06

Marcin


1 Answers

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.

like image 149
codefinger Avatar answered Jun 25 '26 14:06

codefinger



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!