first
This commit is contained in:
+9
-10
@@ -1,15 +1,14 @@
|
||||
import os
|
||||
from fastapi import FastAPI
|
||||
|
||||
APP_NAME = os.getenv("APP_NAME", "Microsoft 365 Service")
|
||||
APP_VERSION = os.getenv("APP_VERSION", "1.0.0")
|
||||
ROOT_PATH = os.getenv("ROOT_PATH", "")
|
||||
from .config import settings
|
||||
from .routes import router as microsoft365_router
|
||||
|
||||
app = FastAPI(
|
||||
title=APP_NAME,
|
||||
version=APP_VERSION,
|
||||
root_path=ROOT_PATH
|
||||
title=settings.app_name,
|
||||
version=settings.app_version,
|
||||
root_path=settings.root_path
|
||||
)
|
||||
app.include_router(microsoft365_router)
|
||||
|
||||
@app.get("/health")
|
||||
def health():
|
||||
@@ -18,8 +17,8 @@ def health():
|
||||
@app.get("/version")
|
||||
def version():
|
||||
return {
|
||||
"app": APP_NAME,
|
||||
"version": APP_VERSION,
|
||||
"app": settings.app_name,
|
||||
"version": settings.app_version,
|
||||
"language": "python",
|
||||
"root_path": ROOT_PATH
|
||||
"root_path": settings.root_path
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user