The project includes automated run scripts that handle starting both servers for you.
macOS/Linux
Windows (PowerShell)
1
Make script executable (first time only)
chmod +x run.sh
2
Run the script
./run.sh
3
Expected output
🚀 Iniciando Conversor de Unidades...[1/3] Levantando ICE Server en puerto 10000ICE PID: 12345[2/3] Levantando Flask Server en puerto 5000Flask PID: 12346[3/3] ¿Quieres levantar ngrok para acceso remoto? (s/n)
4
Choose ngrok option
Type n to run locally without ngrok:
✅ Servidores activos: - ICE Server: http://localhost:10000 - Web App: http://localhost:5000Presiona Ctrl+C para detener
The script automatically handles process cleanup when you press Ctrl+C
1
Set execution policy (if needed)
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
2
Run the script
powershell -ExecutionPolicy Bypass -File run.ps1
3
Expected output
🚀 Iniciando Conversor de Unidades...[1/3] Levantando ICE Server en puerto 10000ICE PID: 12345[2/3] Levantando Flask Server en puerto 5000Flask PID: 12346[3/3] ¿Quieres levantar ngrok para acceso remoto? (s/n)
4
Choose ngrok option
Type n to run locally without ngrok:
✅ Servidores activos: - ICE Server: http://localhost:10000 - Web App: http://localhost:5000Presiona Ctrl+C para detener
Validate that you’re running from the project root directory
Start the ICE server in the background (backend/server.py)
Wait 3 seconds for ICE server initialization
Start the Flask web server in the background (backend/web_server.py)
Wait 2 seconds for Flask server initialization
Prompt for optional ngrok tunnel setup
Handle graceful shutdown with Ctrl+C
# Terminal 1: ICE Serverecho -e "${GREEN}[1/3] Levantando ICE Server en puerto 10000${NC}"cd backendpython3 server.py &ICE_PID=$!# Esperar a que ICE esté listosleep 3# Terminal 2: Flask Serverecho -e "${GREEN}[2/3] Levantando Flask Server en puerto 5000${NC}"python3 web_server.py &FLASK_PID=$!
If you prefer more control or need to debug individual components, you can start each server manually.
1
Open two terminal windows
You’ll need separate terminals for the ICE server and Flask server.
2
Activate virtual environment in both terminals
macOS/Linux
Windows (PowerShell)
Windows (CMD)
cd /path/to/Conversor_Unidades_Remoto-1source .venv/bin/activate
cd C:\path\to\Conversor_Unidades_Remoto-1.\.venv\Scripts\Activate.ps1
cd C:\path\to\Conversor_Unidades_Remoto-1.venv\Scripts\activate.bat
3
Start ICE server (Terminal 1)
cd backendpython3 server.py
You should see output confirming the server is listening on port 10000.
4
Start Flask web server (Terminal 2)
cd backendpython3 web_server.py
Expected output:
✓ Iniciando servidor Flask...✓ Conectado al servidor ICE en puerto 10000✓ Servidor Flask escuchando en http://localhost:5000 Para exponerlo con ngrok ejecuta: ngrok http 5000
5
Access the application
Open your browser and navigate to:
http://localhost:5000
Make sure to start the ICE server before the Flask server. The Flask server needs to connect to the ICE server during startup.