-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_app.bat
More file actions
94 lines (81 loc) · 2.83 KB
/
start_app.bat
File metadata and controls
94 lines (81 loc) · 2.83 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
@echo off
REM ============================================================
REM Code Review Agent - Full Application Starter
REM Starts backend + React frontend dev server
REM ============================================================
setlocal enabledelayedexpansion
REM Navigate to project directory (this script's folder)
cd /d %~dp0
echo.
echo ============================================================
echo Code Review Agent - Starting Full Application
echo ============================================================
echo.
REM Check if venv is activated
if not defined VIRTUAL_ENV (
echo Activating virtual environment...
call .venv\Scripts\activate.bat
echo Virtual environment activated
) else (
echo Virtual environment already active
)
REM Load .env into this session so child windows inherit it.
REM (pydantic-settings reads .env for Python processes, but uvicorn reload/streamlit Windows shells
REM can miss it depending on how they're launched. This makes it explicit.)
if exist .env (
for /f "usebackq tokens=1,* delims==" %%A in (".env") do (
set "line=%%A"
if not "!line!"=="" (
if not "!line:~0,1!"=="#" (
set "key=%%A"
set "val=%%B"
if not "!key!"=="" set "!key!=!val!"
)
)
)
)
echo.
echo ============================================================
echo Starting Backend Server...
echo ============================================================
echo.
echo Backend will run on: http://127.0.0.1:8000
echo API Docs available at: http://127.0.0.1:8000/docs
echo.
REM Start backend in a new window (inherits env from this script)
start "Code Review Agent - Backend" cmd /k "python -m uvicorn app.main:app --reload"
REM Wait for backend to start
timeout /t 3 /nobreak
echo.
echo ============================================================
echo Starting React Frontend (Vite)...
echo ============================================================
echo.
echo Frontend will run on: http://localhost:8080
echo.
REM Start frontend in a new window (inherits env from this script)
start "Code Review Agent - Frontend" cmd /k "cd /d %~dp0frontend && pnpm dev"
REM Wait a bit for frontend to start
timeout /t 2 /nobreak
echo.
echo ============================================================
echo SUCCESS! Application is Starting
echo ============================================================
echo.
echo BACKEND: http://127.0.0.1:8000
echo FRONTEND: http://localhost:8080
echo API DOCS: http://127.0.0.1:8000/docs
echo.
echo Two windows should have opened:
echo 1. Backend Server (FastAPI)
echo 2. Frontend Dev Server (Vite)
echo.
echo Open your browser to: http://localhost:8080
echo.
echo To stop:
echo - Close both windows
echo - Or press CTRL+C in each window
echo.
echo ============================================================
echo.
pause