system-prompts-and-models-o.../N8N_AI_Integration/start_server.py
copilot-swe-agent[bot] 2d9c440987 Initial analysis and build plan
Co-authored-by: gejjech <221578902+gejjech@users.noreply.github.com>
2025-09-25 05:11:08 +00:00

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()