-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_portable.bat
More file actions
56 lines (48 loc) · 1.39 KB
/
Copy pathstart_portable.bat
File metadata and controls
56 lines (48 loc) · 1.39 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
@echo off
echo ============================================
echo ExamPilot - Starte...
echo ============================================
echo.
cd /d "%~dp0"
REM Check if .env exists, create template if not
if not exist ".env" (
echo ANTHROPIC_API_KEY=your-api-key-here> ".env"
echo SECRET_KEY=change-this-to-a-random-secret-key>> ".env"
)
REM Check if API key is configured (either in .env or as system env var)
set "HAS_KEY=0"
REM Check system environment variable
if defined ANTHROPIC_API_KEY (
echo API-Key gefunden (Umgebungsvariable).
set "HAS_KEY=1"
)
REM Check .env file for a real key (not placeholder)
if "%HAS_KEY%"=="0" (
findstr /C:"your-api-key-here" ".env" >nul 2>&1
if errorlevel 1 (
REM .env does NOT contain placeholder, so it has a real key
echo API-Key gefunden (.env Datei).
set "HAS_KEY=1"
)
)
if "%HAS_KEY%"=="0" (
echo WICHTIG: Kein API-Key konfiguriert!
echo.
echo Option 1: Umgebungsvariable setzen:
echo setx ANTHROPIC_API_KEY "sk-ant-..."
echo.
echo Option 2: Key in .env Datei eintragen:
echo Oeffne .env mit einem Texteditor und
echo ersetze "your-api-key-here" mit deinem Key.
echo.
pause
exit /b 1
)
echo.
echo Server startet auf http://localhost:8000
echo Schueler verbinden sich mit: http://DEINE-IP:8000
echo.
echo Zum Beenden dieses Fenster schliessen.
echo.
ExamPilot.exe
pause