20 lines
461 B
Bash
20 lines
461 B
Bash
#!/usr/bin/env sh
|
|
|
|
set -e
|
|
|
|
PORT="${PORT:-3000}"
|
|
BACKEND_PORT="${BACKEND_PORT:-8000}"
|
|
|
|
echo "Starting FastAPI backend on :${BACKEND_PORT}..."
|
|
uvicorn backend.main:app --host 0.0.0.0 --port "${BACKEND_PORT}" &
|
|
BACKEND_PID=$!
|
|
|
|
echo "Starting Node static frontend on :${PORT}..."
|
|
node dist/server.js &
|
|
FRONTEND_PID=$!
|
|
|
|
trap 'echo "Stopping services..."; kill ${BACKEND_PID} ${FRONTEND_PID} 2>/dev/null || true' INT TERM
|
|
|
|
wait -n "${BACKEND_PID}" "${FRONTEND_PID}"
|
|
|