-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-dev.cmd
More file actions
55 lines (45 loc) · 1.1 KB
/
Copy pathstart-dev.cmd
File metadata and controls
55 lines (45 loc) · 1.1 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
@echo off
setlocal
cd /d "%~dp0"
if not exist "api\.venv" (
echo Creating API virtual environment...
py -3.12 -m venv api\.venv
if errorlevel 1 (
python -m venv api\.venv
if errorlevel 1 exit /b 1
)
)
echo Installing API dependencies...
call api\.venv\Scripts\python.exe -m pip install --upgrade pip
if errorlevel 1 exit /b 1
call api\.venv\Scripts\python.exe -m pip install -e "api[dev,worker]"
if errorlevel 1 exit /b 1
echo Preparing local API database...
pushd api
call .venv\Scripts\python.exe -m alembic upgrade head
if errorlevel 1 (
popd
exit /b 1
)
call .venv\Scripts\python.exe -m app.cli
if errorlevel 1 (
popd
exit /b 1
)
popd
if not exist "web\package-lock.json" (
echo Missing web\package-lock.json.
exit /b 1
)
if not exist "web\node_modules" (
echo Installing web dependencies...
call npm --prefix web ci
if errorlevel 1 exit /b 1
)
echo Starting AE NetScope...
echo.
echo Web: http://127.0.0.1:5173
echo API: http://127.0.0.1:8000/api/health
echo.
start "AE NetScope API" cmd /k call "%~dp0start-api.cmd"
start "AE NetScope Web" cmd /k call "%~dp0start-web.cmd"