-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.bat
More file actions
37 lines (32 loc) · 1.38 KB
/
run.bat
File metadata and controls
37 lines (32 loc) · 1.38 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
@echo off
set "PATH=%PATH%;%USERPROFILE%\.bun\bin;D:\projects\mingw64\bin"
set "LIBRARY_PATH=D:\projects\mingw64\x86_64-w64-mingw32\lib"
echo 🔍 Checking for running services...
taskkill /F /IM rust-file-backend.exe /T >nul 2>&1
taskkill /F /IM bun.exe /T >nul 2>&1
echo 🐳 Stopping running Nginx container...
docker kill rust-file-nginx >nul 2>&1
docker rm rust-file-nginx >nul 2>&1
echo 🚀 Starting Rust File Backend (API Service)...
:: Set environment variables for MinGW64 and start cargo in API mode
start "Backend API" cmd /k "cd api && set \"CC=gcc\" && set \"CXX=g++\" && cargo run --release --bin rust-file-backend -- --mode api --port 3000"
echo 👷 Starting Rust File Backend (Worker Service)...
start "Backend Worker" cmd /k "cd api && set \"CC=gcc\" && set \"CXX=g++\" && cargo run --release --bin rust-file-backend -- --mode worker"
echo 🌐 Starting React Frontend...
echo 🐳 Starting Nginx Container...
start "Nginx" cmd /k "docker-compose -f docker-compose.nginx.yml up"
cd web
:: Simple check to ensure dependencies are installed
if not exist node_modules (
echo 📦 Installing frontend dependencies...
bun install
)
start "Frontend" cmd /k "bun run dev"
echo.
echo ✅ services have been restarted in separate windows.
echo API: http://127.0.0.1:3000
echo Worker: Background Service
echo Frontend: http://localhost:5173
echo Nginx: http://localhost:80
echo.
pause