Adds /api/health, ntfy notify on config save, /admin/analytics charts, and deploy smoke for miniprogram config/API. Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|---|---|---|
| .. | ||
| app | ||
| README.md | ||
| requirements.txt | ||
Nomadro API Gateway
统一 FastAPI 出口(OpenAPI / SDK)。垂直后端仍在各 apps/*/backend 与 apps/payjsapi。
本地
cd apps/api
python -m venv .venv
# Windows: .\.venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000
- Docs: http://127.0.0.1:8000/docs
- Health: http://127.0.0.1:8000/v1/health
- Modules: http://127.0.0.1:8000/v1/modules
- Pay resolve:
POST /v1/pay/resolve
环境变量
| 变量 | 默认 | 说明 |
|---|---|---|
PORT |
8000 |
监听端口 |
PAYJSAPI_URL |
http://127.0.0.1:8007 |
支付网关 |
COMMUNITY_API_URL |
http://127.0.0.1:8055 |
社群 FastAPI |
EBOOK_API_URL |
http://127.0.0.1:8010 |
电子书 FastAPI |
POCKETBASE_URL |
http://127.0.0.1:8090 |
PocketBase |
CORS_ORIGINS |
* |
逗号分隔 |
门户 Next 默认 API_URL=http://127.0.0.1:8000,rewrite /api/v1/* → 本服务(或社群后端,见 next.config.ts)。