示例#1
0
def main():
    """Runs the application as a service"""
    server = WebServer(port=8181)
    try:
        server.serve()
        while 1:
            sleep(1)
    except KeyboardInterrupt:
        server.shutdown()
        quit()
示例#2
0
def main():
    """Runs the application as a service"""
    controller = Controller()
    server = WebServer(port=8181, controller=controller)
    try:
        controller.run()
        server.serve()
        while 1:
            sleep(1)
    except KeyboardInterrupt:
        controller.stop()
        server.shutdown()
        quit()