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

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

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -