update local startup flow and add root env example

Make the project start more reliably in the current Windows bash setup, add a safe root .env.example for onboarding, and lower the backend Python floor to 3.11 to match the validated local environment.
This commit is contained in:
2026-03-25 21:42:26 +08:00
parent db1a46af39
commit d85cb9cf35
7 changed files with 692 additions and 8 deletions

View File

@@ -267,9 +267,16 @@ fi
BACKEND_PID="$!"
echo "Waiting for backend..."
sleep 5
backend_ready=false
for _ in $(seq 1 30); do
if port_in_use "$BACKEND_PORT"; then
backend_ready=true
break
fi
sleep 1
done
if ! port_in_use "$BACKEND_PORT"; then
if [[ "$backend_ready" != true ]]; then
echo "[ERROR] Backend did not start successfully."
echo "[ERROR] Check logs: $BACKEND_LOG $BACKEND_ERR_LOG"
exit 1
@@ -283,7 +290,7 @@ echo "Starting frontend on port ${FRONTEND_PORT}..."
if [[ "$USE_WINDOWS_TOOLS" == true ]]; then
(
cd "$FRONTEND_DIR"
exec cmd.exe /c npm run dev -- --host "$FRONTEND_HOST"
exec cmd.exe /c npm.cmd run dev -- --host "$FRONTEND_HOST"
) >"$FRONTEND_LOG" 2>"$FRONTEND_ERR_LOG" &
FRONTEND_PID="$!"
else