File size: 1,527 Bytes
bb8f662
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
67
68
69
70
71
72
@echo off
REM Quick Start Script for VQA Mobile App
REM This script helps you start the backend and frontend

echo ========================================
echo VQA Mobile App - Quick Start
echo ========================================
echo.

REM Get current IP address
echo [1/3] Checking your IP address...
for /f "tokens=2 delims=:" %%a in ('ipconfig ^| findstr /c:"IPv4"') do (
    set IP=%%a
    set IP=!IP:~1!
    echo Your IP: !IP!
)

echo.
echo [2/3] Current Configuration:
echo   Backend: http://10.215.4.143:8000
echo   Frontend: ui/src/config/api.js
echo.

echo IMPORTANT: Make sure both laptop and mobile are on the SAME network!
echo.

echo [3/3] Choose an option:
echo   1. Start Backend (Python)
echo   2. Start Frontend (Expo)
echo   3. Start Both (Opens 2 terminals)
echo   4. Exit
echo.

choice /c 1234 /n /m "Enter your choice (1-4): "

if errorlevel 4 goto :end
if errorlevel 3 goto :both
if errorlevel 2 goto :frontend
if errorlevel 1 goto :backend

:backend
echo.
echo Starting Backend Server...
echo Make sure you have activated your Python environment!
echo.
python backend_api.py
goto :end

:frontend
echo.
echo Starting Expo Frontend...
cd ui
npx expo start
goto :end

:both
echo.
echo Starting both Backend and Frontend...
echo Opening Backend in new window...
start cmd /k "python backend_api.py"
timeout /t 3 /nobreak >nul
echo Opening Frontend in new window...
start cmd /k "cd ui && npx expo start"
echo.
echo Both servers are starting in separate windows!
goto :end

:end
echo.
echo Done!
pause