Spaces:
Building
Building
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,8 @@ from fastapi import FastAPI
|
|
2 |
from fastapi.staticfiles import StaticFiles
|
3 |
import uvicorn
|
4 |
from log import log
|
5 |
-
|
|
|
6 |
|
7 |
from auth_controller import router as auth_router
|
8 |
from config_controller import router as config_router
|
@@ -12,22 +13,12 @@ from test_controller import router as test_router
|
|
12 |
from api_controller import router as api_router
|
13 |
|
14 |
app = FastAPI()
|
15 |
-
|
16 |
-
# 📦 Static HTML + Bootstrap UI entegrasyonu
|
17 |
app.mount("/static", StaticFiles(directory="static"), name="static")
|
18 |
|
19 |
-
# 🌍 Merkezi config
|
20 |
-
service_config = ServiceConfig()
|
21 |
-
service_config.load()
|
22 |
-
|
23 |
-
def get_config():
|
24 |
-
return service_config
|
25 |
-
|
26 |
@app.get("/")
|
27 |
def health_check():
|
28 |
return {"status": "ok"}
|
29 |
|
30 |
-
# Router eklemeleri
|
31 |
app.include_router(auth_router, prefix="/auth")
|
32 |
app.include_router(config_router, prefix="/config")
|
33 |
app.include_router(project_router, prefix="/project")
|
|
|
2 |
from fastapi.staticfiles import StaticFiles
|
3 |
import uvicorn
|
4 |
from log import log
|
5 |
+
|
6 |
+
from config_provider import get_config # ✅ artık app.py buradan çekiyor
|
7 |
|
8 |
from auth_controller import router as auth_router
|
9 |
from config_controller import router as config_router
|
|
|
13 |
from api_controller import router as api_router
|
14 |
|
15 |
app = FastAPI()
|
|
|
|
|
16 |
app.mount("/static", StaticFiles(directory="static"), name="static")
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
@app.get("/")
|
19 |
def health_check():
|
20 |
return {"status": "ok"}
|
21 |
|
|
|
22 |
app.include_router(auth_router, prefix="/auth")
|
23 |
app.include_router(config_router, prefix="/config")
|
24 |
app.include_router(project_router, prefix="/project")
|