def main() -> int: server = WebServer(port=8085) server.add_rule('task1', task1) try: server.run() except KeyboardInterrupt: server.close() return 0