From 450ec9d6924233207ed82b896d7a01ead5382088 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 5 Jun 2025 19:11:53 +0200 Subject: [PATCH] Add root html endpoint --- prophet/app.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/prophet/app.py b/prophet/app.py index 7ee5287..abb78ec 100644 --- a/prophet/app.py +++ b/prophet/app.py @@ -9,6 +9,7 @@ from uuid import uuid4 import feedparser from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware +from fastapi.responses import HTMLResponse from groq import Groq BEE_FEED = "https://babylonbee.com/feed" @@ -185,6 +186,24 @@ def improve_summary(original_title: str, new_title: str, original_summary: str): return rewrite_summary_with_groq(o, new_title) +@app.get("/", response_class=HTMLResponse) +def root_route(): + return """ + + + + FastAPI with HTMX + + + +

Welcome to FastAPI with HTMX

+
+ + + + """ + + def start() -> None: from uvicorn import run