Skip to content

Commit 658c78a

Browse files
authored
Update main.py
1 parent 92e8db4 commit 658c78a

File tree

1 file changed

+7
-2
lines changed
  • helloworld-samples/app-python

1 file changed

+7
-2
lines changed

helloworld-samples/app-python/main.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
from flask import Flask
21
import os
2+
import jsonify
3+
from flask import Flask
34

45
app = Flask(__name__)
56

67
# set up root route
78
@app.route("/")
89
def hello_world():
9-
return "Hello World"
10+
response = {
11+
"message": "Hello World",
12+
"status": 200
13+
}
14+
return jsonify(response)
1015

1116
# Get the PORT from environment
1217
port = os.getenv('PORT', '8080')

0 commit comments

Comments
 (0)