Skip to content

Commit

Permalink
Add configureable root path
Browse files Browse the repository at this point in the history
  • Loading branch information
Teddy-1000 committed Nov 29, 2024
1 parent 0878546 commit 567c341
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Run with:
# For developing: uvicorn main:app --reload
import logging
import os

import metadata_endpoints
from brotli_asgi import BrotliMiddleware
Expand Down Expand Up @@ -28,7 +29,10 @@ def setup_logging():

logger = logging.getLogger(__name__)

app = FastAPI(swagger_ui_parameters={"tryItOutEnabled": True})
app = FastAPI(
swagger_ui_parameters={"tryItOutEnabled": True},
root_path=os.getenv("FASTAPI_ROOT_PATH", ""),
)
app.add_middleware(BrotliMiddleware)


Expand Down

1 comment on commit 567c341

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API Unit Test Coverage Report
FileStmtsMissCoverMissing
\_\_init\_\_.py00100% 
datastore_pb2.py645219%24–75
datastore_pb2_grpc.py432347%37–52, 85–87, 92–94, 99–101, 106–108, 112–136, 174, 191, 208, 225
grpc_getter.py201145%15–16, 20–23, 27–29, 33–35
locustfile.py15150%1–31
main.py42783%46, 51, 61, 71–72, 82–83
metadata_endpoints.py552456%42–51, 55, 82, 97–171, 175
response_classes.py50100% 
utilities.py802272%15, 33, 40, 62–65, 73–84, 89–96, 116, 120, 122
custom_geo_json
   edr_feature_collection.py60100% 
formatters
   \_\_init\_\_.py110100% 
   covjson.py54198%75
   geojson.py15287%17, 42
routers
   \_\_init\_\_.py00100% 
   edr.py93496%248–249, 308–309
   feature.py461959%75–108, 124–129, 135–157
TOTAL54918067% 

API Unit Test Coverage Summary

Tests Skipped Failures Errors Time
23 0 💤 0 ❌ 0 🔥 1.881s ⏱️

Please sign in to comment.