File size: 1,217 Bytes
12832d8
29f5dfb
12832d8
 
d0cf3c9
12832d8
 
 
 
 
 
d0cf3c9
12832d8
 
 
d0cf3c9
29f5dfb
 
d0cf3c9
 
 
 
 
 
 
12832d8
 
 
 
d0cf3c9
12832d8
 
 
 
 
d0cf3c9
12832d8
 
d0cf3c9
12832d8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
import uvicorn
from log import log
from service_config import ServiceConfig

from auth_controller import router as auth_router
from config_controller import router as config_router
from project_controller import router as project_router
from spark_controller import router as spark_router
from test_controller import router as test_router
from api_controller import router as api_router

app = FastAPI()

# πŸ“¦ Static HTML + Bootstrap UI entegrasyonu
app.mount("/static", StaticFiles(directory="static"), name="static")

# 🌍 Merkezi config
service_config = ServiceConfig()
service_config.load()

def get_config():
    return service_config

@app.get("/")
def health_check():
    return {"status": "ok"}

# Router eklemeleri
app.include_router(auth_router, prefix="/auth")
app.include_router(config_router, prefix="/config")
app.include_router(project_router, prefix="/project")
app.include_router(spark_router, prefix="/spark")
app.include_router(test_router, prefix="/test")
app.include_router(api_router, prefix="/api")

if __name__ == "__main__":
    log("🌐 Starting Flare UI Backend.")
    uvicorn.run(app, host="0.0.0.0", port=7860)