diff --git a/server/main.py b/server/main.py index 47d24f4..d5cde6a 100644 --- a/server/main.py +++ b/server/main.py @@ -1,5 +1,8 @@ from fastapi import FastAPI from transformers import logging +from dotenv import load_dotenv +from uvicorn import run +import os from src.controllers.ForgeController import ForgeController @@ -7,6 +10,11 @@ logging.set_verbosity_error() +load_dotenv("../config/.env.local") + +host = os.getenv("SERVER_HOST") +port = int(os.getenv("SERVER_PORT")) + @app.get("/") def welcome(): @@ -22,3 +30,5 @@ def welcome(): forge_routes = ForgeController().get_router() app.include_router(forge_routes) + +run("main:app", host=host, port=port) \ No newline at end of file