From 658c78abd1dc47dda43e709b3dcff29238317ab1 Mon Sep 17 00:00:00 2001 From: Fabio Cardoso de Souza <52511011+souzafc@users.noreply.github.com> Date: Thu, 20 Feb 2025 17:58:53 -0500 Subject: [PATCH] Update main.py --- helloworld-samples/app-python/main.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/helloworld-samples/app-python/main.py b/helloworld-samples/app-python/main.py index b0ed1f8f2..413ebda77 100644 --- a/helloworld-samples/app-python/main.py +++ b/helloworld-samples/app-python/main.py @@ -1,12 +1,17 @@ -from flask import Flask import os +import jsonify +from flask import Flask app = Flask(__name__) # set up root route @app.route("/") def hello_world(): - return "Hello World" + response = { + "message": "Hello World", + "status": 200 + } + return jsonify(response) # Get the PORT from environment port = os.getenv('PORT', '8080')