diff --git a/bootstrap.bat b/bootstrap.bat index aa7dca9..e96326c 100644 --- a/bootstrap.bat +++ b/bootstrap.bat @@ -10,9 +10,10 @@ IF "%MODE%"=="development" GOTO DEV :PROD echo Starting DeerFlow in [PRODUCTION] mode... -uv run server.py +start uv run server.py cd web -pnpm start +start pnpm start +REM Wait for user to close GOTO END :DEV diff --git a/bootstrap.sh b/bootstrap.sh index e824268..bf84f17 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -11,6 +11,8 @@ if [ "$1" = "--dev" -o "$1" = "-d" -o "$1" = "dev" -o "$1" = "development" ]; th wait else echo -e "Starting DeerFlow in [PRODUCTION] mode...\n" - uv run server.py - cd web && pnpm start + uv run server.py & SERVER_PID=$$! + cd web && pnpm start & WEB_PID=$$! + trap "kill $$SERVER_PID $$WEB_PID" SIGINT SIGTERM + wait fi