Skip to content

Commit

Permalink
Add health endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
CannonLock committed Sep 16, 2024
1 parent 9e631bb commit ca9a37d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion macrostrat_db_insertion/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
app.run(host = "0.0.0.0", port = 9543, debug = True)

0 comments on commit ca9a37d

Please sign in to comment.