From 84afe4f39ddb9266309a7f0b17d334e022a2988b Mon Sep 17 00:00:00 2001 From: Piyush Bhavsar <114468009+piyushbhavsarr@users.noreply.github.com> Date: Tue, 9 Jan 2024 18:02:39 +0530 Subject: [PATCH] added health check in app.py --- app.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app.py b/app.py index 77ac68a..923315f 100644 --- a/app.py +++ b/app.py @@ -79,5 +79,10 @@ def new_quote(): sentiment, summary = analyze_quote(quote) return jsonify({'quote': quote, 'sentiment': sentiment, 'summary': summary}) +@app.route('/health') +def health_check(): + return jsonify({"status": "healthy"}), 200 + + if __name__ == '__main__': app.run(debug=True)