Spaces:
Sleeping
Sleeping
File size: 1,478 Bytes
1dd9186 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | @echo off
setlocal
set "ROOT=%~dp0"
set "PYTHON_EXE=python"
set "BACKEND_PORT=8000"
set "FRONTEND_PORT=5173"
cd /d "%ROOT%"
where %PYTHON_EXE% >nul 2>nul
if errorlevel 1 (
echo System Python was not found in PATH.
echo Install Python or add it to PATH, then run this file again.
pause
exit /b 1
)
if not exist "backend\main.py" (
echo backend\main.py was not found.
pause
exit /b 1
)
if not exist "package.json" (
echo package.json was not found.
pause
exit /b 1
)
where npm >nul 2>nul
if errorlevel 1 (
echo npm was not found in PATH.
echo Install Node.js or add npm to PATH, then run this file again.
pause
exit /b 1
)
if not exist "node_modules\.bin\vite.cmd" (
echo Frontend dependencies are missing. Running npm install...
call npm install
if errorlevel 1 (
echo npm install failed.
pause
exit /b 1
)
)
start "Nodes UI Flow Backend" /D "%ROOT%" cmd /k ""%PYTHON_EXE%" "backend\main.py" --server --port %BACKEND_PORT%"
start "Nodes UI Flow Frontend" /D "%ROOT%" cmd /k "npm run dev -- --host 0.0.0.0 --port %FRONTEND_PORT%"
timeout /t 2 /nobreak >nul
start "" "http://localhost:%FRONTEND_PORT%"
echo Backend: http://localhost:%BACKEND_PORT%
echo Frontend: http://localhost:%FRONTEND_PORT%
echo Live debug can point to Brains separately, usually http://localhost:8001.
echo.
echo Close the opened Backend and Frontend terminal windows to stop the interface.
endlocal
|