mirror of
https://github.com/resf/distro-tools.git
synced 2024-12-22 10:58:28 +00:00
Add healthcheck to apollo-server
This commit is contained in:
parent
7c43d9b05c
commit
437917dc91
@ -59,6 +59,11 @@ Logger()
|
|||||||
Database(True, app, ["apollo.db"])
|
Database(True, app, ["apollo.db"])
|
||||||
|
|
||||||
|
|
||||||
|
@app.get("/_/healthz")
|
||||||
|
async def health():
|
||||||
|
return {"status": "ok"}
|
||||||
|
|
||||||
|
|
||||||
@app.exception_handler(404)
|
@app.exception_handler(404)
|
||||||
async def not_found_handler(request, exc):
|
async def not_found_handler(request, exc):
|
||||||
if request.url.path.startswith("/api"
|
if request.url.path.startswith("/api"
|
||||||
|
Loading…
Reference in New Issue
Block a user