Files
gcontext/api/app/main.py
T
bernatsamperaandClaude Fable 5 aca7523754 Add workflows API, the marketplace backend (marketplace task 3b)
FastAPI + Postgres service that stores workflow templates as file
bundles with indexed manifest fields, submit-for-review publishing,
and moderation endpoints behind an admin token.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 13:15:47 +02:00

24 lines
491 B
Python

from contextlib import asynccontextmanager
from fastapi import FastAPI
from .db import init_db
from .routes_moderation import router as moderation_router
from .routes_public import router as public_router
@asynccontextmanager
async def lifespan(app: FastAPI):
init_db()
yield
app = FastAPI(title="gcontext workflows API", lifespan=lifespan)
app.include_router(public_router)
app.include_router(moderation_router)
@app.get("/health")
def health():
return {"status": "ok"}