-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrun.bat
More file actions
41 lines (34 loc) · 856 Bytes
/
Copy pathrun.bat
File metadata and controls
41 lines (34 loc) · 856 Bytes
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
@echo off
setlocal
REM Check if we need to build the frontend
if "%1"=="build" (
echo Building frontend...
cd frontend
call npm install
call npm run build
cd ..
goto :eof
)
REM Start the backend and frontend servers
if "%1"=="backend" (
echo Starting backend server...
cd backend
python -m uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
goto :eof
)
if "%1"=="frontend" (
echo Starting frontend server...
cd frontend
call npm run dev
goto :eof
)
REM If no specific service is specified, start both
if "%1"=="" (
echo Starting both backend and frontend servers...
REM Start backend in a new window
start cmd /k "cd backend && python -m uvicorn app.main:app --reload --host 0.0.0.0 --port 8000"
REM Start frontend
cd frontend
call npm run dev
)
endlocal