-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-dev.sh
More file actions
executable file
·44 lines (33 loc) · 2.41 KB
/
Copy pathstart-dev.sh
File metadata and controls
executable file
·44 lines (33 loc) · 2.41 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
#!/usr/bin/env bash
# ─── UMC Development Startup Script ───────────────────────────────────────────
# Launches the Rust backend for local development.
#
# Usage: ./start-dev.sh
# ──────────────────────────────────────────────────────────────────────────────
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
echo -e "${YELLOW}🚀 Starting UMC development services...${NC}"
# ─── Check prerequisites ──────────────────────────────────────────────────────
command -v cargo >/dev/null 2>&1 || { echo -e "${RED}❌ Rust/Cargo not found. Install from https://rustup.rs${NC}"; exit 1; }
# ─── 1. Rust Backend (umc-api) ────────────────────────────────────────────────
echo -e "${YELLOW}🔧 Starting umc-api (Rust backend) on port 8080...${NC}"
cargo run -p umc-api &
API_PID=$!
echo -e "${GREEN}✓ umc-api started (PID: $API_PID)${NC}"
# ─── Summary ──────────────────────────────────────────────────────────────────
echo ""
echo -e "${GREEN}═══════════════════════════════════════════════════════════${NC}"
echo -e "${GREEN} UMC Development Services Started${NC}"
echo -e "${GREEN}═══════════════════════════════════════════════════════════${NC}"
echo -e " API: http://localhost:8080 (PID: $API_PID)"
echo -e "${GREEN}═══════════════════════════════════════════════════════════${NC}"
echo ""
echo "Press Ctrl+C to stop."
# Wait for all background processes
wait