feat: add bootstrap script for development and production modes on windows

This commit is contained in:
Wang Hao 2025-05-01 12:43:27 +08:00
parent a21dff27bb
commit 4d7165d51c
2 changed files with 31 additions and 0 deletions

View File

@ -89,7 +89,11 @@ This project also includes a Web UI, offering a more dynamic and engaging intera
```bash ```bash
# Run both the backend and frontend servers in development mode # Run both the backend and frontend servers in development mode
# On macOS/Linux
./bootstrap.sh -d ./bootstrap.sh -d
# On Windows
bootstrap.bat -d
``` ```
Open your browser and visit [`http://localhost:3000`](http://localhost:3000) to explore the web UI. Open your browser and visit [`http://localhost:3000`](http://localhost:3000) to explore the web UI.

27
bootstrap.bat Normal file
View File

@ -0,0 +1,27 @@
@echo off
SETLOCAL ENABLEEXTENSIONS
REM Check if argument is dev mode
SET MODE=%1
IF "%MODE%"=="--dev" GOTO DEV
IF "%MODE%"=="-d" GOTO DEV
IF "%MODE%"=="dev" GOTO DEV
IF "%MODE%"=="development" GOTO DEV
:PROD
echo Starting DeerFlow in [PRODUCTION] mode...
uv run server.py
cd web
pnpm start
GOTO END
:DEV
echo Starting DeerFlow in [DEVELOPMENT] mode...
start uv run server.py --reload
cd web
start pnpm dev
REM Wait for user to close
pause
:END
ENDLOCAL