Skip to content

Commit

Permalink
deleted old function
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansurf committed May 27, 2024
1 parent 07027d5 commit 0d9e990
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions src/backend/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,44 +174,6 @@ def set_output_values(args, ocean):
ocean["json_output"] = 1
return ocean

# def start_website(website):
# """
# If the WEBSITE .env variable is true, the webserver is started
# """
# if website == True:
# subprocess.Popen(["python", "-m", "http.server", str(website_port)], cwd="../frontend")

# def start_website(website, config_file_path="../../config.json"):
# """
# If the WEBSITE json variable is true, the web server is started
# """
# if website:
# try:
# # Set the directory where the files to be served are located
# os.chdir("../frontend")

# # Custom handler to serve config.json
# class CustomHandler(SimpleHTTPRequestHandler):
# def do_GET(self):
# if self.path == '/config.json':
# with open(config_file_path, 'rb') as f:
# self.send_response(200)
# self.send_header('Content-type', 'application/json')
# self.end_headers()
# self.wfile.write(f.read())
# else:
# super().do_GET()

# # Create a custom HTTP server
# httpd = HTTPServer(("", website_port), CustomHandler)
# print(f"Website started on port {website_port}...")

# # Serve files indefinitely
# httpd.serve_forever()
# except Exception as e:
# print("Error starting the server:", e)


def json_output(data_dict):
"""
If JSON=TRUE in .args, we print and return the JSON data
Expand Down

0 comments on commit 0d9e990

Please sign in to comment.