Allow concurrently run server.py and web in production mode. (#25)

* Allow concurrently run server.py and web in production mode.

* Allow concurrently run server.py and web in production mode.

* Allow concurrently run server.py and web in production mode.
This commit is contained in:
牧毅 2025-05-18 11:33:00 +08:00 committed by GitHub
parent f7d79b6d83
commit ffe706d0df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -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