23 lines
637 B
Python
23 lines
637 B
Python
from fastapi import FastAPI
|
|
from fastapi.staticfiles import StaticFiles
|
|
from routers.web_routes import router as web_router
|
|
import uvicorn
|
|
from core.config_loader import config
|
|
|
|
app = FastAPI()
|
|
|
|
# Router einbinden
|
|
app.include_router(web_router)
|
|
app.mount("/static", StaticFiles(directory="static"), name="static")
|
|
|
|
if __name__ == "__main__":
|
|
root_p = config['server'].get('root_path', "")
|
|
uvicorn.run(
|
|
"main:app",
|
|
reload=True,
|
|
host=config['server']['host'],
|
|
port=config['server']['port'],
|
|
root_path=root_p,
|
|
proxy_headers=True, # Wichtig für Caddy
|
|
forwarded_allow_ips="*")
|