feat: add new file

This commit is contained in:
丹尼尔
2026-03-10 17:13:55 +08:00
commit 551abd1b68
4156 changed files with 805309 additions and 0 deletions

29
start.sh Normal file
View File

@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -e
# 项目根目录
ROOT="$(cd "$(dirname "$0")" && pwd)"
echo "== 检查 Node / npm =="
if ! command -v node >/dev/null 2>&1 || ! command -v npm >/dev/null 2>&1; then
echo "未检测到 node 或 npm请先安装 Node.js 再运行本脚本。"
exit 1
fi
echo "== 安装后端依赖 =="
cd "$ROOT/backend"
npm install
echo "== 启动后端 (http://localhost:3000) =="
npm run dev &
BACKEND_PID=$!
echo "== 安装前端依赖 =="
cd "$ROOT/frontend"
npm install
echo "== 启动前端 (http://localhost:5173) =="
npm run dev
echo "== 结束前关闭后端 =="
kill "$BACKEND_PID" 2>/dev/null || true