How to create Procfile for Python in Heroku?

I cannot find a reliable answer to this question after you have tried the Internet for answers. Currently, I have my directory installed like this:

flaskapp
     -app
        -intro_to_flask
              +__init__.py
              +config.py
              +routes.py
              +forms.py
        -runserver.py
        -Readme.md
     -bin
     -include
     -lib
     -view
Procfile
requirements.txt

So I'm not sure if ProcfileI’m configured correctly ... I configured it like this:

web: gunicorn --pythonpath app runserver

However, when I run the senior wizard ... heroku enters a loop that restarts the connection, I tried to manually configure the port in the virtual export environment PORT = 5001, but I still get the same error:

Running on http://127.0.0.1:5000/
12:21:20 web.1  |  * Restarting with reloader
12:21:20 web.1  | 2014-02-22 12:21:20 [34532] [INFO] Starting gunicorn 18.0
12:21:20 web.1  | 2014-02-22 12:21:20 [34532] [ERROR] Connection in use: ('0.0.0.0', 5001)

In addition, I killed all the shooting processes that were used and tried to start the wizard again ... any ideas what could happen?

Here is my runserver.py

from intro_to_flask import app

app.run(debug=True)
+3
source share
1 answer

gunicorn, script, . , , - , . , , Procfile, :

web: gunicorn --pythonpath app intro_to_flask:app

, , , . , , , , .

, .

+2

All Articles