From ca9a37d53f92aafd9e61ed36a2943e8c16f6b881 Mon Sep 17 00:00:00 2001 From: Cannon Lock Date: Mon, 16 Sep 2024 11:36:32 -0500 Subject: [PATCH] Add health endpoint --- macrostrat_db_insertion/server.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/macrostrat_db_insertion/server.py b/macrostrat_db_insertion/server.py index c817eee..16149b7 100644 --- a/macrostrat_db_insertion/server.py +++ b/macrostrat_db_insertion/server.py @@ -416,5 +416,13 @@ def record_run(): return jsonify({"sucess" : "Sucessfully processed the run"}), 200 + +@app.route("/health", methods=["GET"]) +def record_run(): + """Health check endpoint""" + + return jsonify({"status": "Server Running"}), 200 + + if __name__ == "__main__": - app.run(host = "0.0.0.0", port = 9543, debug = True) \ No newline at end of file + app.run(host = "0.0.0.0", port = 9543, debug = True)