This commit is contained in:
Kavalar 2025-01-13 19:39:31 +03:00
parent 8d8954b4ac
commit 60f5373baa

14
main.py
View File

@ -59,5 +59,15 @@ def get_port(subdomain: str):
if __name__ == "__main__":
with FrontDemoDaemon('/tmp/front-demo-daemon.pid', error_log_file='/var/log/daemon_logs/front-demo-daemon.txt') as front:
front.process_command()
webServer = HTTPServer((hostName, serverPort), MyServer)
print(f"Server started http://{hostName}:{serverPort}")
try:
webServer.serve_forever()
except KeyboardInterrupt:
pass
webServer.server_close()
print("Http server stopped.")
# with FrontDemoDaemon('/tmp/front-demo-daemon.pid', error_log_file='/var/log/daemon_logs/front-demo-daemon.txt') as front:
# front.process_command()