#!/usr/bin/env python3
"""
Servidor web ultra simple - puerto 5050
"""

import http.server
import socketserver
import os

# Cambiar al directorio actual
os.chdir(os.path.dirname(os.path.abspath(__file__)))

PORT = 5000

handler = http.server.SimpleHTTPRequestHandler

with socketserver.TCPServer(("", PORT), handler) as httpd:
    print(f"✅ Servidor en http://localhost:{PORT}")
    print("📁 Sirviendo archivos desde:", os.getcwd())
    print("⏹️  Ctrl+C para parar")
    
    try:
        httpd.serve_forever()
    except KeyboardInterrupt:
        print("\n🛑 Servidor detenido")
