From 1f2e86d54592ea2e84c5ac7520506ab47bbe8570 Mon Sep 17 00:00:00 2001 From: sTiKyt Date: Sat, 22 Aug 2020 18:45:38 +0000 Subject: [PATCH] Replaced old start_ngrok with NgrokController methods --- Defs/ActionManager/Server/server_runner.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Defs/ActionManager/Server/server_runner.py b/Defs/ActionManager/Server/server_runner.py index 7443f37..a3f9ab2 100644 --- a/Defs/ActionManager/Server/server_runner.py +++ b/Defs/ActionManager/Server/server_runner.py @@ -26,6 +26,9 @@ from Defs.ImportManager.unsorted_will_be_replaced import url_request from Defs.ImportManager.unsorted_will_be_replaced import wait from Defs.ImportManager.unsorted_will_be_replaced import ZipFile from Defs.LocalizationManager.helper import print_sorted_as_menu +from controllers.ngrok_controller import NgrokController +from controllers.terminal_controller import TerminalController + try: os.mkdir("Server/www") @@ -50,7 +53,13 @@ def server_selection(port): # Question where user must select server start_localhost(port) # FIXED elif choice == "01": run_command("clear") - start_ngrok(port) # FIXED + # start_ngrok(port) # FIXME replace this shit with MVC + NgrokController().close_latest_connection() + TerminalController().clear() + NgrokController().maintain_default_config() + NgrokController().activate_config_path() + NgrokController().establish_connection(port=port) + print(NgrokController().ngrok_url) elif choice == "02": run_command("clear") start_serveo(port) # TODO ALMOST FIXED