title: How to launch a Bottle application over a CherryPy standalone web server?
body: <p>I have a python web app developed using the bottle framework. My bottle app is web API that provide methods that return JSon data, so no static content is needed. I am trying to deploy it to production using a CherryPy server which is supposed to be robust for production applications. </p>
  
  <p>My web_api.py file (my bottle app) looks something like this:</p>
  
  <pre><code>from bottle import Bottle, request
  
  app = Bottle()
  
  @app.get('/stuff')
  def do_stuff():
      '''
      Method that does stuff.
      '''
      stuff = {'data': 'some data'}
      # Return the environment info as Json data
      return stuff
  </code></pre>
  
  <p>I have a server.py file to launch the Bottle app over the CherryPy server that looks like this:</p>
  
  <pre><code>from my_package.web_api import app
  from cherrypy.wsgiserver import CherryPyWSGIServer
  
  server = CherryPyWSGIServer(
      ('0.0.0.0', 80),
      app,
      server_name='My_App',
      numthreads=30)
  
  server.start()
  </code></pre>
  
  <p>so when I run my server using this command:</p>
  
  <pre><code>python server.py
  </code></pre>
  
  <p>My server is successfully started and start listening in port 80 as expected. However once I start my web server I cannot stop it any more. I have tried Ctrl + C which works with the development server but has no effect here. Am I starting the server the right way? How do I stop it once it is running? Is this the correct way to launch a Bottle app over CherryPy?</p>
  
  <p>BTW, I am running python 2.7 in Windows 8.</p>