From 31bd39a6af38890d2aaac8f21aae5662f0018047 Mon Sep 17 00:00:00 2001 From: plpycoin <103234125+plpycoin@users.noreply.github.com> Date: Fri, 1 Nov 2024 16:44:20 +0800 Subject: [PATCH] chore, load envs from current directory * fastapi uses the environment variables in. env under the current directory --- server/app/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/app/main.py b/server/app/main.py index 7670bae1..6c14e107 100644 --- a/server/app/main.py +++ b/server/app/main.py @@ -2,6 +2,9 @@ from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from server.app.routes import pipeline +from dotenv import load_dotenv + +load_dotenv() app = FastAPI() os.environ["USE_FRONTEND"] = "true"