# AdCloud Server 面向开发者和 coding agent 的广告云埋点与广告推送后端。使用 FastAPI 开发,依赖和虚拟环境统一由 **uv** 管理。 当前为开发脚手架,提供健康检查与 API 文档;埋点与广告推送功能待实现。 ## 开发 ```sh uv sync uv run uvicorn adcloud_server.main:app --reload --host 127.0.0.1 --port 8000 ``` - 健康检查:`http://localhost:8000/health` - API 文档:`http://localhost:8000/docs` - OpenAPI:`http://localhost:8000/openapi.json` 默认允许来自 `http://localhost:3000`、`http://localhost:5173` 的浏览器请求。 通过环境变量配置逗号分隔的允许来源: ```sh CORS_ORIGINS=https://your-frontend.example uv run uvicorn adcloud_server.main:app ``` ## 检查 ```sh uv run pytest uv run ruff check . uv run ruff format --check . ``` 提交 `uv.lock`,在其他电脑使用 `uv sync --locked` 复现依赖。