Spaces:
Running
Running
File size: 444 Bytes
9da3acc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #!/bin/bash
# Exit immediately if a command exits with a non-zero status
set -e
echo "Starting FastAPI backend internally..."
cd /app/backend
# Bind to localhost so only Next.js can communicate with it
uvicorn main:app --host 127.0.0.1 --port 8000 &
# Wait a few seconds to ensure FastAPI is fully up
sleep 3
echo "Starting Next.js frontend on HF port 7860..."
cd /app/frontend
# HF requires the exposed app to be on 7860
PORT=7860 npm start |