2025-10-13 17:26:41 +03:00

79 lines
1.4 KiB
Batchfile

@echo off
REM AI Review - Build & Start
echo ================================
echo AI Review - Starting
echo ================================
echo.
REM 1. Build Frontend
echo [1/3] Building frontend...
cd frontend
if not exist "node_modules\" (
echo Installing npm packages...
call npm install
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] npm install failed
cd ..
pause
exit /b 1
)
)
echo Building...
call npm run build
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Frontend build failed
cd ..
pause
exit /b 1
)
echo [OK] Frontend built to backend\public
cd ..
REM 2. Setup Backend
echo.
echo [2/3] Setting up backend...
cd backend
if not exist "venv\" (
echo Creating venv...
python -m venv venv
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Failed to create venv
cd ..
pause
exit /b 1
)
)
echo Activating venv...
call venv\Scripts\activate.bat
echo Installing dependencies...
pip install -q -r requirements.txt
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Failed to install dependencies
cd ..
pause
exit /b 1
)
REM 3. Start Backend
echo.
echo [3/3] Starting server...
echo ================================
echo.
echo URL: http://localhost:8000
echo API Docs: http://localhost:8000/docs
echo.
echo Press Ctrl+C to stop
echo ================================
echo.
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload