I am trying to start an aiohttp based server using Gunicorn.
Here is the command:
gunicorn aiohttpdemo_polls:app --bind 127.0.0.1:8080
It returns:
Failed to find application: 'aiohttpdemo_polls'
But when I run it with python -m as below:
python -m aiohttpdemo_polls
It works great. The code can be found from here , which is a demo application in the aiohttp repository. Also tried this as below:
gunicorn aiohttpdemo_polls.main:app --bind 127.0.0.1:8080
But also the server does not work. He returns
Failed to find application: 'aiohttpdemo_polls.main'
Any idea where to look next to fix the problem?
source
share