tfrere's picture
update readme and cleanup
8d4d46d
raw
history blame
672 Bytes
from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
import os
from dotenv import load_dotenv
# Load environment variables
load_dotenv()
# API configuration
API_HOST = os.getenv("API_HOST", "0.0.0.0")
API_PORT = int(os.getenv("API_PORT", "3002"))
app = FastAPI()
# Mount static files for the React client
app.mount("/", StaticFiles(directory="static", html=True), name="static")
def start():
"""Entry point for the Poetry script"""
import uvicorn
uvicorn.run("server:app", host=API_HOST, port=API_PORT, reload=True)
if __name__ == "__main__":
import uvicorn
uvicorn.run("server:app", host=API_HOST, port=API_PORT, reload=True)