Exemplo n.º 1
0
def serve(application, host='127.0.0.1', port=8080):
    """Diesel-based (greenlet) WSGI-HTTP server.
	
	As a minor note, this is crazy. Diesel includes Flask, too.
	"""

    # Instantiate the server with a host/port configuration and our application.
    WSGIApplication(application, port=int(port), iface=host).run()
Exemplo n.º 2
0
 def diesel(app, address, **options):
     from diesel.protocols.wsgi import WSGIApplication
     app = WSGIApplication(app, port=address[1])
     app.run()
Exemplo n.º 3
0
 def run(self, handler):
     from diesel.protocols.wsgi import WSGIApplication
     app = WSGIApplication(handler, port=self.port)
     app.run()
Exemplo n.º 4
0
def diesel_adapter(host, port):
    # Experimental (Mostly untested).
    from diesel.protocols.wsgi import WSGIApplication
    app = WSGIApplication(handle_request, port=int(port))
    app.run()
Exemplo n.º 5
0
 def diesel(app, address, **options):
     from diesel.protocols.wsgi import WSGIApplication
     app = WSGIApplication(app, port=address[1])
     app.run()
Exemplo n.º 6
0
 def run(self, handler):
     from diesel.protocols.wsgi import WSGIApplication
     app = WSGIApplication(handler, port=self.port)
     app.run()
Exemplo n.º 7
0
def diesel_adapter(host, port):
    # Experimental (Mostly untested).
    from diesel.protocols.wsgi import WSGIApplication
    app = WSGIApplication(handle_request, port=int(port))
    app.run()