We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 58652e4 commit 6901836Copy full SHA for 6901836
app/config.py
@@ -3,6 +3,7 @@
3
4
class Settings(BaseSettings):
5
anthropic_api_key: str
6
+ root_path: str = ""
7
model_config = SettingsConfigDict(env_file=".env")
8
9
app/main.py
@@ -9,7 +9,8 @@
logger = logging.getLogger()
10
logger.setLevel(logging.INFO)
11
12
-app = FastAPI()
+# TODO consider https://github.com/FanchenBao/fastapi_lambda_api-gateway_sample/blob/main/app/main.py for CORS
13
+app = FastAPI(root_path=settings.root_path)
14
handler = Mangum(app)
15
16
anthropic_client = Anthropic(api_key=settings.anthropic_api_key)
0 commit comments