from wsgiref.simple_server import make_server
from . import WSGIApplication


def run_server(settings):
    application = WSGIApplication(settings)
    httpd = make_server('', 8000, application)
    print("Serving on port 8000...")
    httpd.serve_forever()



def run_server(settings):
    '''Run application using wsgiref test server
    '''
    from wsgiref.simple_server import make_server
    from . import WSGIApplication
    application = WSGIApplication(settings)
    httpd = make_server('', 8000, application)
    print("Serving on port 8000...")
    httpd.serve_forever()


def run_tornado(settings):
    '''Run application using Tornade Web framework WSGI server
    '''
    from tornado import ioloop, httpserver, wsgi
    from . import WSGIApplication
    application = WSGIApplication(settings)
    container = wsgi.WSGIContainer(application)
    http_server = httpserver.HTTPServer(container)
    http_server.listen(8000)
    ioloop.IOLoop.instance().start()

Add base tornado server support
Add base tornado server support

- from wsgiref.simple_server import make_server
- from . import WSGIApplication
  
  
  def run_server(settings):
+     '''Run application using wsgiref test server
+     '''
+     from wsgiref.simple_server import make_server
+     from . import WSGIApplication
      application = WSGIApplication(settings)
      httpd = make_server('', 8000, application)
      print("Serving on port 8000...")
      httpd.serve_forever()
  
+ 
+ def run_tornado(settings):
+     '''Run application using Tornade Web framework WSGI server
+     '''
+     from tornado import ioloop, httpserver, wsgi
+     from . import WSGIApplication
+     application = WSGIApplication(settings)
+     container = wsgi.WSGIContainer(application)
+     http_server = httpserver.HTTPServer(container)
+     http_server.listen(8000)
+     ioloop.IOLoop.instance().start()
+ 
Add base tornado server support
## Code Before:
from wsgiref.simple_server import make_server
from . import WSGIApplication


def run_server(settings):
    application = WSGIApplication(settings)
    httpd = make_server('', 8000, application)
    print("Serving on port 8000...")
    httpd.serve_forever()

## Instruction:
Add base tornado server support
## Code After:


def run_server(settings):
    '''Run application using wsgiref test server
    '''
    from wsgiref.simple_server import make_server
    from . import WSGIApplication
    application = WSGIApplication(settings)
    httpd = make_server('', 8000, application)
    print("Serving on port 8000...")
    httpd.serve_forever()


def run_tornado(settings):
    '''Run application using Tornade Web framework WSGI server
    '''
    from tornado import ioloop, httpserver, wsgi
    from . import WSGIApplication
    application = WSGIApplication(settings)
    container = wsgi.WSGIContainer(application)
    http_server = httpserver.HTTPServer(container)
    http_server.listen(8000)
    ioloop.IOLoop.instance().start()
