SkillForge / start.sh
dpv007's picture
Create start.sh
9da3acc verified
raw
history blame contribute delete
444 Bytes
#!/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