I searched around and couldn't find a really clear answer to this question, although I think this thread and specifically this answer might help to shed some light.
What I can tell you is that none of the Procfiles I have ever created for Flask apps to deploy in Heroku contained .py
or parentheses.
A typical Procfile for me looks like this:
web: gunicorn app:app
Then in the same directory is the main app file app.py
that contains a line:
app = Flask(__name__)
As far as I can tell the first app
in the command points to the file (module) app.py
, and the second to the variable app
that is defined as Flask(__name__)
.
So for your case the following should work:
web: gunicorn platform:app
Assuming you have a Python module named platform.py
and then inside that file you would need to have a line
app = create_app()
The create_app()
function in the tutorial you referenced returns a Flask
object so that should do the job.