- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapplication.py
More file actions
Latest commit
24 lines (20 loc) · 626 Bytes
/
Copy pathapplication.py
File metadata and controls
24 lines (20 loc) · 626 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
importjson
importsys
importos
importflask
importrequests
application=flask.Flask(__name__)
@application.route('/')
defhello_world():
# google_url = "https://www.google.com"
# requests.get(google_url)
returnflask.jsonify({
# 'name': str(requests.get(google_url)),
'name': 'Hello World',
'python_version': sys.version.split(" ", 2)[0],
'environment': os.environ.copy(),
'flask_version': flask.__version__,
})
if__name__=='__main__':
port=int(os.environ.get("FLASK_RUN_PORT", 8000))
application.run(host='0.0.0.0', debug=True, port=port)