Files
DanDing1Todo_Web/dev.bat
Mr.Xia 2c4549ad79
Some checks failed
CI / lint (push) Has been cancelled
CI / build (push) Has been cancelled
fa
2026-02-26 21:29:54 +08:00

51 lines
1.2 KiB
Batchfile

@echo off
echo ========================================
echo Starting Development Server
echo ========================================
echo.
REM Check if node_modules exists
if not exist "node_modules" (
echo [INFO] node_modules not found. Installing dependencies...
echo.
call pnpm install
if errorlevel 1 (
echo.
echo [ERROR] Failed to install dependencies. Please check your pnpm installation.
pause
exit /b 1
)
echo.
echo [SUCCESS] Dependencies installed successfully.
echo.
) else (
echo [INFO] Dependencies already installed.
echo.
)
REM Check if pnpm is available
where pnpm >nul 2>nul
if errorlevel 1 (
echo [ERROR] pnpm is not installed or not in PATH.
echo Please install pnpm: npm install -g pnpm
pause
exit /b 1
)
echo [INFO] Starting development server...
echo [INFO] Server will be available at: http://localhost:3000
echo [INFO] Press Ctrl+C to stop the server
echo.
echo ========================================
echo.
REM Start the development server
call pnpm dev
REM If server exits, pause to show any errors
if errorlevel 1 (
echo.
echo [ERROR] Development server exited with errors.
pause
)