mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2025-12-16 21:45:14 +00:00
24 lines
680 B
Python
24 lines
680 B
Python
|
|
import http.server
|
|
import socketserver
|
|
import os
|
|
import webbrowser
|
|
from pathlib import Path
|
|
|
|
PORT = 8080
|
|
DIRECTORY = Path(__file__).parent
|
|
|
|
class CustomHTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
|
|
def __init__(self, *args, **kwargs):
|
|
super().__init__(*args, directory=str(DIRECTORY), **kwargs)
|
|
|
|
def start_server():
|
|
with socketserver.TCPServer(("", PORT), CustomHTTPRequestHandler) as httpd:
|
|
print(f"🧠 N8N AI Integration Hub running at http://localhost:{PORT}")
|
|
print("Press Ctrl+C to stop the server")
|
|
webbrowser.open(f"http://localhost:{PORT}")
|
|
httpd.serve_forever()
|
|
|
|
if __name__ == "__main__":
|
|
start_server()
|