Skip to content Skip to sidebar Skip to footer

Why Can't I Deploy React Flask App On Heroku?

Newbie here again asking another question. This time is more about Heroku itself. So, I have a project built with react for the main front-end and Flask as an Internal API. So far,

Solution 1:

The application needs to bind to the port provided by Heroky via the PORT environment variable

app.run(host='0.0.0.0', debug=False, port=int(os.environ.get("PORT", 5000)))

On you local it will use the default 5000, but on Heroku it will bind to PORT

Post a Comment for "Why Can't I Deploy React Flask App On Heroku?"