fix:优化界面
This commit is contained in:
19
start.sh
Normal file
19
start.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/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}"
|
||||
|
||||
Reference in New Issue
Block a user