@echo off
REM Start Both Backend and Frontend Servers
REM This script launches both servers in separate windows

echo ========================================
echo CHURCH APP - STARTING ALL SERVERS
echo ========================================
echo.

echo [1/2] Starting Backend Server (Flask API)...
start "Church App - Backend" cmd /k "cd /d "%~dp0" && start-backend.bat"
timeout /t 3 /nobreak > nul

echo [2/2] Starting Frontend Server (React)...
start "Church App - Frontend" cmd /k "cd /d "%~dp0" && start-frontend.bat"

echo.
echo ========================================
echo BOTH SERVERS STARTED
echo ========================================
echo.
echo Two new windows have opened:
echo   1. Backend Server (Flask API on port 5000)
echo   2. Frontend Server (React on port 3000)
echo.
echo Access the app at:
echo   Local:    http://localhost:3000
echo   LAN:      http://192.168.74.1:3000
  echo   External: http://houseofprayer.ddns.net:3000
echo.
echo To stop servers, close both windows or press Ctrl+C
echo.
pause
