Files
bocai/run-project.sh
2026-01-20 11:26:14 +08:00

21 lines
528 B
Bash
Raw 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.

#!/bin/bash
# 启动后端Spring Boot应用
echo "正在启动后端应用..."
cd "$(dirname "$0")" && java -jar target/bocai-0.0.1-SNAPSHOT.jar &
# 等待后端启动
sleep 5
# 启动前端Vue应用
echo "正在启动前端应用..."
cd frontend && npm run dev &
echo "前后端应用已启动!"
echo "后端服务http://localhost:8080"
echo "前端服务:通常为 http://localhost:5173 (具体端口请查看前端启动日志)"
echo "按 Ctrl+C 停止所有服务..."
# 等待用户中断
trap "kill 0" EXIT
wait