-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmirofish_bf.sh
More file actions
executable file
·64 lines (50 loc) · 1.32 KB
/
mirofish_bf.sh
File metadata and controls
executable file
·64 lines (50 loc) · 1.32 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
#!/bin/bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
MIROFISH_DIR="$ROOT_DIR/MiroFish"
usage() {
cat <<'EOF'
Easy launcher for MiroFish backend + frontend.
Usage:
./mirofish_bf.sh
./mirofish_bf.sh --help
Starts:
- backend on http://localhost:5001
- frontend on http://localhost:3000
Uses MiroFish/.env for backend config.
Stop both services with Ctrl+C.
EOF
}
if [[ "${1:-}" == "-h" || "${1:-}" == "--help" ]]; then
usage
exit 0
fi
if [[ ! -d "$MIROFISH_DIR" ]]; then
echo "❌ MiroFish directory not found: $MIROFISH_DIR" >&2
exit 1
fi
if [[ ! -f "$MIROFISH_DIR/package.json" ]]; then
echo "❌ MiroFish/package.json not found." >&2
exit 1
fi
if [[ ! -f "$MIROFISH_DIR/.env" ]]; then
echo "❌ Missing MiroFish/.env" >&2
echo " Create it first, e.g.: cp MiroFish/.env.example MiroFish/.env" >&2
exit 1
fi
if ! command -v npm >/dev/null 2>&1; then
echo "❌ npm is required but was not found in PATH." >&2
exit 1
fi
if ! command -v uv >/dev/null 2>&1; then
echo "❌ uv is required but was not found in PATH." >&2
exit 1
fi
echo "🚀 Starting MiroFish backend + frontend"
echo "📁 Directory: $MIROFISH_DIR"
echo "🌐 Frontend: http://localhost:3000"
echo "🔌 Backend: http://localhost:5001"
echo "🛑 Stop: Ctrl+C"
echo
cd "$MIROFISH_DIR"
exec npm run dev