Files
Document_Translator/start_frontend.bat
beabigegg b11a8272c4 2ND
2025-09-02 13:11:48 +08:00

46 lines
1.0 KiB
Batchfile
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
echo 正在啟動 PANJIT Document Translator 前端服務...
REM 檢查 Node.js 是否安裝
node --version >nul 2>&1
if errorlevel 1 (
echo 錯誤: 未檢測到 Node.js請先安裝 Node.js 16+ 版本
pause
exit /b 1
)
REM 檢查是否在前端目錄
if not exist "frontend\package.json" (
echo 錯誤: 請在專案根目錄執行此腳本
pause
exit /b 1
)
REM 進入前端目錄
cd frontend
REM 檢查 node_modules 是否存在
if not exist "node_modules" (
echo 正在安裝依賴套件...
npm install
if errorlevel 1 (
echo 依賴安裝失敗,請檢查網路連線和 npm 配置
pause
exit /b 1
)
)
echo.
echo ==========================================
echo PANJIT Document Translator Frontend
echo ==========================================
echo 前端服務正在啟動...
echo 服務地址: http://localhost:3000
echo API 地址: http://localhost:5000
echo ==========================================
echo.
REM 啟動開發服務器
npm run dev
pause