Repository navigation
Expand file tree
/
Copy pathdev.bat
More file actions
118 lines (91 loc) · 2.12 KB
/
Copy pathdev.bat
File metadata and controls
118 lines (91 loc) · 2.12 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
@echo off
setlocal
title Cargo - LAN File Transfer
echo ==========================================
echo CARGO DEVELOPMENT MODE
echo LAN File Transfer System
echo ==========================================
echo.
REM ==========================================
REM 1. Check Python
REM ==========================================
echo [1/4] Verifying Python...
python --version >nul 2>&1
if errorlevel 1 (
echo.
echo [ERROR] Python was not found.
echo.
echo Install Python 3.13 or higher and try again.
echo.
pause
exit /b 1
)
python --version
echo Python OK.
echo.
REM ==========================================
REM 2. Create virtual environment
REM ==========================================
echo [2/4] Verifying virtual environment...
if not exist ".venv\Scripts\python.exe" (
echo Virtual environment not found.
echo Creating .venv...
echo.
python -m venv .venv
if errorlevel 1 (
echo.
echo [ERROR] Failed to create virtual environment.
echo.
pause
exit /b 1
)
echo Virtual environment created.
) else (
echo Virtual environment found.
)
echo.
REM ==========================================
REM 3. Install dependencies
REM ==========================================
echo [3/4] Verifying dependencies...
call .venv\Scripts\activate.bat
python -m pip install --upgrade pip
if errorlevel 1 (
echo.
echo [ERROR] Failed to update pip.
echo.
pause
exit /b 1
)
python -m pip install -r requirements.txt
if errorlevel 1 (
echo.
echo [ERROR] Failed to install dependencies.
echo.
pause
exit /b 1
)
echo.
echo Dependencies OK.
echo.
REM ==========================================
REM 5. Start Cargo
REM ==========================================
echo [4/4] Initiating Cargo...
echo.
echo ==========================================
echo CARGO ONLINE
echo ==========================================
echo.
echo.
echo Starting development server...
echo.
echo API:
echo http://127.0.0.1:8000
echo.
python -m uvicorn app.main:app --reload
echo.
echo Cargo was stopped.
echo.
pause
endlocal