Add healthcheck to apollo-server

This commit is contained in:
Mustafa Gezen 2023-02-02 12:59:36 +01:00
parent 7c43d9b05c
commit 437917dc91
Signed by untrusted user who does not match committer: mustafa
GPG Key ID: DCDF010D946438C1

View File

@ -59,6 +59,11 @@ Logger()
Database(True, app, ["apollo.db"])
@app.get("/_/healthz")
async def health():
return {"status": "ok"}
@app.exception_handler(404)
async def not_found_handler(request, exc):
if request.url.path.startswith("/api"