title: Running aiohttp server using gunicorn
body: <p>I am trying to run a aiohttp based server using Gunicorn.</p>
  
  <p>Here is the command:</p>
  
  <pre><code>gunicorn aiohttpdemo_polls:app --bind 127.0.0.1:8080
  </code></pre>
  
  <p>It returns:</p>
  
  <pre><code>Failed to find application: 'aiohttpdemo_polls' 
  </code></pre>
  
  <p>But when I am running it using python -m like below:</p>
  
  <pre><code>python -m aiohttpdemo_polls
  </code></pre>
  
  <p>It works fine. The code can be found from <a href="https://github.com/aio-libs/aiohttp/tree/master/demos/polls" rel="noreferrer">here</a> which is a demo app in the aiohttp repo. 
  Also tried it like below:</p>
  
  <pre><code>gunicorn aiohttpdemo_polls.main:app --bind 127.0.0.1:8080
  </code></pre>
  
  <p>But its also not running the server. It returns </p>
  
  <pre><code>Failed to find application: 'aiohttpdemo_polls.main'
  </code></pre>
  
  <p>Any idea where to look further for fixing the issue?</p>