Files
DeepAudit/backend/start.sh
T
lintsinghua 6ce5b3c6c1 refactor: 重构项目结构,将前端和后端代码分离到独立目录
- 将前端代码移动到 frontend/ 目录
- 将后端代码移动到 backend/ 目录
- 更新 .gitignore 以包含 Python 和前端构建产物
- 修复 LLM JSON 解析问题,增强错误处理
- 修复前端配置默认值,改为从后端获取
- 删除 AdminDashboard 中的数据库信息和统计卡片
- 完善系统配置管理,支持从后端获取默认配置
2025-11-26 21:11:12 +08:00

29 lines
619 B
Bash
Executable File

#!/bin/bash
# 使用 uv 启动后端服务
set -e
echo "🚀 启动 XCodeReviewer 后端服务..."
# 检查 uv 是否安装
if ! command -v uv &> /dev/null; then
echo "❌ 未找到 uv,请先安装:"
echo " curl -LsSf https://astral.sh/uv/install.sh | sh"
exit 1
fi
# 同步依赖(如果需要)
if [ ! -d ".venv" ]; then
echo "📦 首次运行,正在安装依赖..."
uv sync
fi
# 运行数据库迁移
echo "🔄 运行数据库迁移..."
uv run alembic upgrade head
# 启动服务
echo "✅ 启动后端服务..."
uv run uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload