File size: 630 Bytes
38c50f9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/bin/bash
set -e

echo "Starting FixFlow Full-Stack Environment..."

# Start FastAPI backend in the background on port 8000
echo "Booting FastAPI (Backend)..."
python -m uvicorn backend.api:app --host 127.0.0.1 --port 8000 &
BACKEND_PID=$!

# Give backend a moment to start
sleep 3

# Start Next.js frontend on port 7860 (Hugging Face Spaces default)
echo "Booting Next.js (Frontend)..."
cd frontend
PORT=7860 npm start &
FRONTEND_PID=$!

echo "Both services started successfully."

# Wait for any process to exit
wait -n

echo "A service exited abruptly. Shutting down."
# Exit with status of process that exited first
exit $?