fixflow / start.sh
E5K7's picture
chore: configure Docker and proxy for HuggingFace Spaces deployment
38c50f9
raw
history blame contribute delete
630 Bytes
#!/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 $?