Add an example site that calls every route, served at /examples/
A reader learns the API fastest from working calls: one page per area (circuit browser, track images, GPS traces on a map, grand prix lookup, posters, Kometa) shows the exact request URL next to its answer. Pages call their own origin when the app serves them, and the public service when opened from disk or given ?api=. Posters render only on a button press, since each one fetches map tiles on the server. A body that does not match the asked format is said in red, never shown as success. The image copies examples/ so the deployed app serves the same pages. Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
This commit is contained in:
@@ -25,6 +25,8 @@ RUN pip install --no-cache-dir -r requirements.txt
|
||||
COPY cdn-api.py access_log.py circuits_service.py ergast_service.py posters_service.py ./
|
||||
COPY models/ ./models/
|
||||
COPY circuits/ ./circuits/
|
||||
# The example site the app serves at /examples/.
|
||||
COPY examples/ ./examples/
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
|
||||
Reference in New Issue
Block a user