-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.bat
More file actions
57 lines (49 loc) · 1.69 KB
/
start.bat
File metadata and controls
57 lines (49 loc) · 1.69 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
@echo off
REM ========================================
REM Z-Image Startup Script
REM ========================================
REM.
REM Check if conda environment exists
echo Checking conda environment...
conda env list | findstr /C:"zimage" >nul
if %errorlevel% neq 0 (
echo Error: conda environment 'zimage' does not exist
echo Please run: conda create -n zimage python=3.10
pause
exit /b 1
)
echo Activating conda environment...
call conda activate zimage
echo.
echo ========================================
echo Starting Backend Service (FastAPI)
echo ========================================
echo Backend will run on http://localhost:15000
echo API Docs: http://localhost:15000/docs
echo.
echo Press Ctrl+C to stop backend service
echo ========================================
echo.
start "Z-Image Backend" cmd /k "conda activate zimage && cd /d %~dp0 && python -m uvicorn backend.main:app --host 0.0.0.0 --port 15000"
echo Waiting for backend service to start...
timeout /t 5 /nobreak >nul
echo.
echo ========================================
echo Starting Frontend Service (React + Vite)
echo ========================================
echo Frontend will run on http://localhost:15001
echo.
echo Press Ctrl+C to stop frontend service
echo ========================================
echo.
start "Z-Image Frontend" cmd /k "conda activate zimage && cd /d %~dp0frontend && npm run dev -- --port 15001"
echo.
echo ========================================
echo Services Started!
echo ========================================
echo.
echo Access App: http://localhost:15001
echo Backend API: http://localhost:15000/docs
echo.
echo Press any key to close this window (services will continue running)
pause >nul