Update AGENTS.md with deployment structure and vite base config note
This commit is contained in:
@@ -31,6 +31,14 @@ cd backend && alembic upgrade head
|
|||||||
alembic revision --autogenerate -m "desc"
|
alembic revision --autogenerate -m "desc"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Deployment
|
||||||
|
|
||||||
|
- **Landing page** at `trade.yuzhiran.com/` — static marketing HTML
|
||||||
|
- **SPA** at `trade.yuzhiran.com/app/` — uni-app build
|
||||||
|
- **Nginx**: `location /app/ { try_files $uri $uri/ /app/index.html; }` for SPA fallback
|
||||||
|
- **vite config**: `base: '/app/'` so all asset paths are `/app/assets/...`
|
||||||
|
- **API**: proxied via nginx `location /api/` to `127.0.0.1:8000`
|
||||||
|
|
||||||
## Critical Quirks
|
## Critical Quirks
|
||||||
|
|
||||||
- **Route ordering**: FastAPI matches top-down. Specific routes (`/{customer_id}/health`) must be registered **before** wildcard `/{customer_id}`.
|
- **Route ordering**: FastAPI matches top-down. Specific routes (`/{customer_id}/health`) must be registered **before** wildcard `/{customer_id}`.
|
||||||
|
|||||||
Reference in New Issue
Block a user