When I use FastAPI , how can I sepcify a base path for the web-service?
To put it another way - are there arguments to the FastAPI object that can set the end-point and any others I define, to a different root path?
For example , if I had the code with the spurious argument root below, it would attach my /my_path end-point to /my_server_path/my_path ?
from fastapi import FastAPI, Request
app = FastAPI(debug = True, root = 'my_server_path')
@app.get("/my_path")
def service( request : Request ):
return { "message" : "my_path" }