-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_all.bat
More file actions
54 lines (45 loc) · 1.96 KB
/
run_all.bat
File metadata and controls
54 lines (45 loc) · 1.96 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
@echo off
REM ============================================
REM Run All Script for Recurrence-Based OTP System
REM Starts all three components simultaneously
REM ============================================
echo.
echo ====================================================
echo Starting Recurrence-Based OTP System
echo ====================================================
echo.
REM Check if virtual environment exists
if not exist "venv\Scripts\activate.bat" (
echo [ERROR] Virtual environment not found!
echo Please run setup.bat first to install dependencies.
pause
exit /b 1
)
REM Activate virtual environment
call venv\Scripts\activate.bat
echo [*] Starting FastAPI Backend Server...
start "OTP Backend Server" cmd /k "venv\Scripts\activate.bat && python -m uvicorn fastapi_server:app --reload --host 0.0.0.0 --port 8000"
REM Wait for backend to start
timeout /t 3 /nobreak > nul
echo [*] Starting OTP Generator (Streamlit)...
start "OTP Generator" cmd /k "venv\Scripts\activate.bat && streamlit run streamlit_generator.py --server.port 8501 --server.enableCORS false --browser.gatherUsageStats false"
REM Wait before starting verifier
timeout /t 2 /nobreak > nul
echo [*] Starting OTP Verifier (Streamlit)...
start "OTP Verifier" cmd /k "venv\Scripts\activate.bat && streamlit run streamlit_verifier.py --server.port 8502 --server.enableCORS false --browser.gatherUsageStats false"
echo.
echo ====================================================
echo All Services Started!
echo ====================================================
echo.
echo Running services:
echo - Backend API: http://localhost:8000
echo - OTP Generator: http://localhost:8501
echo - OTP Verifier: http://localhost:8502
echo.
echo API Documentation: http://localhost:8000/docs
echo.
echo Press any key to close this window (services will continue running)
echo To stop services, close the individual terminal windows
echo ====================================================
pause