-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.bat
More file actions
66 lines (58 loc) · 1.5 KB
/
Copy pathstart.bat
File metadata and controls
66 lines (58 loc) · 1.5 KB
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
63
64
65
66
@echo off
echo ============================================
echo ExamPilot - Starte...
echo ============================================
echo.
cd /d "%~dp0"
REM Check if Python is available
python --version >nul 2>&1
if errorlevel 1 (
echo FEHLER: Python wurde nicht gefunden!
echo Bitte Python 3.11+ installieren: https://www.python.org/downloads/
pause
exit /b 1
)
REM Check if venv exists, if not create it
if not exist "backend\venv" (
echo Erstelle virtuelle Umgebung...
cd backend
python -m venv venv
call venv\Scripts\activate.bat
pip install -r requirements.txt
cd ..
) else (
call backend\venv\Scripts\activate.bat
)
REM Check if .env exists, create template if not
if not exist "backend\.env" (
echo ANTHROPIC_API_KEY=your-api-key-here> backend\.env
echo SECRET_KEY=change-this-to-a-random-secret-key>> backend\.env
)
REM Check if API key is configured (env var or .env)
set "HAS_KEY=0"
if defined ANTHROPIC_API_KEY (
set "HAS_KEY=1"
)
if "%HAS_KEY%"=="0" (
findstr /C:"your-api-key-here" "backend\.env" >nul 2>&1
if errorlevel 1 set "HAS_KEY=1"
)
if "%HAS_KEY%"=="0" (
echo.
echo WICHTIG: Kein API-Key konfiguriert!
echo Option 1: setx ANTHROPIC_API_KEY "sk-ant-..."
echo Option 2: Key in backend\.env eintragen
echo.
)
REM Build frontend if dist doesn't exist
if not exist "frontend\dist" (
echo Baue Frontend...
cd frontend
call npm install
call npm run build
cd ..
)
echo.
cd backend
python main.py
pause