kindergarten_java/reading-platform-frontend/start-frontend.sh

19 lines
314 B
Bash

#!/bin/bash
# 前端启动脚本
# 确保从正确目录启动
cd "$(dirname "$0")"
echo "🚀 正在启动前端服务..."
echo "📂 工作目录: $(pwd)"
# 检查 node_modules 是否存在
if [ ! -d "node_modules" ]; then
echo "📦 正在安装依赖..."
npm install
fi
# 启动前端
npm run dev