python - Heroku Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch -


i keep getting error despite trying out in internet. i'm trying run flask application on heroku.

below procfile

web gunicorn -b 127.0.0.1:8000 geeni:app  

below geeni.py file.

class chargeuser(resource):     def post(self):         jsondata = request.get_json(force=true)         stripeid = jsondata['stripeid_customer']         currency = jsondata['currency']         amount = jsondata['amount']         apikey = jsondata['api_key']         try:             stripe.charge.create(amount = amount, source=stripeid, currency=currency)             return jsonify({'msg':'charged!'})         except:             raise  api.add_resource(chargeuser,'/') if __name__ == '__main__':     app.run() 

i've setup heroku push/login , have throughly followed tutorials. no luck..

enter image description here

your procfile should web: gunicorn -b 0.0.0.0:$port greeni:app. written, heroku never see application ready receive inbound connections:

  • the 127.0.0.1 interface not receive external network traffic. instead, 0.0.0.0 string bind external interfaces.
  • heroku passes required port via $port variable, 5000.

remember - heroku manages "routing mesh", receives inbound http traffic, forwards application. assigns address , port, can't hard-coded in procfile.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -