Repository navigation
Expand file tree
/
Copy pathsetup-dev.bat
More file actions
64 lines (55 loc) · 1.48 KB
/
Copy pathsetup-dev.bat
File metadata and controls
64 lines (55 loc) · 1.48 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
@echo off
setlocal
set "ROOT=%~dp0"
set "CORE_DIR=%ROOT%pulsecast-core"
set "UI_DIR=%ROOT%pulsecast-ui"
echo PulseCast development setup
echo ===========================
where cargo >nul 2>nul
if errorlevel 1 (
echo [error] Rust/Cargo was not found in PATH.
echo Install Rust from https://rustup.rs/ and run this script again.
pause
exit /b 1
)
where npm >nul 2>nul
if errorlevel 1 (
echo [error] Node.js/npm was not found in PATH.
echo Install Node.js from https://nodejs.org/ and run this script again.
pause
exit /b 1
)
if not exist "%CORE_DIR%\Cargo.toml" (
echo [error] Backend project not found at "%CORE_DIR%".
pause
exit /b 1
)
if not exist "%UI_DIR%\package.json" (
echo [error] Frontend project not found at "%UI_DIR%".
pause
exit /b 1
)
echo Preparing frontend dependencies...
if not exist "%UI_DIR%\node_modules" (
echo Installing frontend packages. This can take a minute...
cd /d "%UI_DIR%" || exit /b 1
call npm install
if errorlevel 1 (
echo [error] Frontend dependency installation failed.
pause
exit /b 1
)
) else (
echo Frontend dependencies already installed.
)
echo.
echo Starting backend simulation core in this terminal...
pushd "%CORE_DIR%" || exit /b 1
start "PulseCast Backend" /b cmd /c "cargo run"
popd
echo Starting frontend dev server in this terminal...
echo Backend WebSocket: ws://127.0.0.1:9001/ws
echo Frontend URL will be shown below, usually http://localhost:5173/
echo.
cd /d "%UI_DIR%" || exit /b 1
call npm run dev