2ND
This commit is contained in:
46
start_frontend.bat
Normal file
46
start_frontend.bat
Normal file
@@ -0,0 +1,46 @@
|
||||
@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
|
Reference in New Issue
Block a user