Files
assist/start_frontend.bat

46 lines
857 B
Batchfile
Raw Normal View History

@echo off
echo 启动TSP智能助手前端开发服务器...
echo.
cd frontend
echo 检查Node.js环境...
node --version >nul 2>&1
if %errorlevel% neq 0 (
echo 错误: 未找到Node.js请先安装Node.js
echo 下载地址: https://nodejs.org/
pause
exit /b 1
)
echo 检查npm环境...
npm --version >nul 2>&1
if %errorlevel% neq 0 (
echo 错误: 未找到npm请检查Node.js安装
pause
exit /b 1
)
echo 检查依赖包...
if not exist "node_modules" (
echo 安装依赖包...
npm install
if %errorlevel% neq 0 (
echo 错误: 依赖包安装失败
pause
exit /b 1
)
)
echo 启动开发服务器...
echo 前端地址: http://localhost:3000
echo 后端API: http://localhost:5000
echo WebSocket: ws://localhost:8765
echo.
echo 按 Ctrl+C 停止服务器
echo.
npm run dev
pause