efihub/app/main.py
Oliver Hofmann 4fbcb99743 Init
2026-04-27 08:33:43 +02:00

23 lines
487 B
Python

from fastapi import FastAPI, WebSocket
from app.core.config import get_settings
settings = get_settings()
app = FastAPI(
title="University Process Hub",
root_path=settings.APP_PREFIX,
)
@app.get("/")
async def root():
return {"status": "ok", "env": settings.APP_ENV}
@app.websocket("/ws/hello/{name}")
async def websocket_hello(websocket: WebSocket, name: str):
await websocket.accept()
await websocket.send_text(f"Hello, {name}!")
await websocket.close()