-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·42 lines (35 loc) · 1.37 KB
/
start.sh
File metadata and controls
executable file
·42 lines (35 loc) · 1.37 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
#!/bin/bash
# ──────────────────────────────────────────────
# OpenBee — Start frontend & backend together
# ──────────────────────────────────────────────
set -e
ROOT_DIR="$(cd "$(dirname "$0")" && pwd)"
BACKEND_DIR="$ROOT_DIR/backend"
FRONTEND_DIR="$ROOT_DIR/frontend"
cleanup() {
echo ""
echo "🐝 Shutting down OpenBee..."
kill $BACKEND_PID $FRONTEND_PID 2>/dev/null
wait $BACKEND_PID $FRONTEND_PID 2>/dev/null
echo "✅ All processes stopped."
}
trap cleanup EXIT INT TERM
# ── Start Backend (FastAPI + uvicorn on port 8000) ──
echo "🔧 Starting backend..."
cd "$BACKEND_DIR"
uv run python server.py &
BACKEND_PID=$!
# ── Start Frontend (Vite dev server on port 5173) ──
echo "🎨 Starting frontend..."
cd "$FRONTEND_DIR"
npm run dev &
FRONTEND_PID=$!
echo ""
echo "──────────────────────────────────────"
echo " 🐝 OpenBee is running!"
echo " Frontend → http://localhost:5173"
echo " Backend → http://localhost:8000"
echo " Press Ctrl+C to stop both."
echo "──────────────────────────────────────"
echo ""
wait