Haride commited on
Commit
6f69689
·
verified ·
1 Parent(s): ae90fea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -1,7 +1,15 @@
1
- from fastapi import FastAPI
2
 
3
  app = FastAPI()
4
 
5
  @app.get("/")
6
  def greet_json():
7
- return {"Hello": "World!"}
 
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI, Response
2
 
3
  app = FastAPI()
4
 
5
  @app.get("/")
6
  def greet_json():
7
+ return {"Hello": "World!"}
8
+
9
+ @app.get("/health")
10
+ def health():
11
+ return {"ok": True}
12
+
13
+ @app.head("/health")
14
+ def health_head():
15
+ return Response(status_code=200)