python - Flask Deploy on Heroku - Error R10 -


i deployed app , ran url shows application error. checked log, states:

* running on http://127.0.0.1:5000/ web process failed bind $port within 60 seconds of launch 

procfile

web: python run.py ${port} 

run.py

from app import app app.run(debug=false) 

i tried

 os import environ  app import app  app.run(debug=false, port=environ.get("port", 5000), processes=2) 

in both case error still persist

views.py

 @app.route('/')  @app.route('/login', methods=["get","post"])  def login():  .... 

that's not how run flask application in production. need actual server, such gunicorn, , point app object:

web: gunicorn app:app 

this explained in heroku tutorial.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -