You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Front-end development expects HTTPS at `https://localhost:8443`. Follow these steps to generate a trusted certificate and run FastAPI over TLS locally.
# 3. Create cert/key for localhost and loopback addresses
95
+
mkdir -p certs
96
+
mkcert -key-file certs/localhost-key.pem \
97
+
-cert-file certs/localhost.pem \
98
+
localhost 127.0.0.1 ::1
99
+
```
100
+
101
+
Start the backend on `https://localhost:8443`:
102
+
103
+
```bash
104
+
poetry run uvicorn app.main:app \
105
+
--reload --host 0.0.0.0 --port 8443 \
106
+
--ssl-certfile certs/localhost.pem \
107
+
--ssl-keyfile certs/localhost-key.pem
108
+
```
109
+
110
+
Your React/Next.js dev server can now proxy or fetch against `https://localhost:8443` without the *ECONNREFUSED* error.
111
+
112
+
_Tip_: For convenience create `scripts/run_dev_https.py` and a Poetry entry-point so you can simply run `poetry run serve-https`. See the script in the repo for details.
113
+
114
+
---
115
+
76
116
## Linting & Type Checking
77
117
```bash
78
118
poetry run ruff check .# lint
@@ -176,4 +216,15 @@ You can also run it ad-hoc without Poetry's script shim:
176
216
177
217
```bash
178
218
poetry run python scripts/generate_openapi.py
179
-
```
219
+
```
220
+
221
+
## Observability
222
+
See docs/observability.md for full guide. Import-ready Grafana dashboards:
223
+
224
+
| Dashboard | File | UID |
225
+
|-----------|------|-----|
226
+
| API latency by route |`docs/grafana/api_latency_by_route.json`|`kv-api-latency`|
0 commit comments