wiki/notebook/assets/challenges.suse-cloud-native-fundamentals-scholarship-program/python-helloworld-app.py

18 lines
346 B
Python
Raw Normal View History

from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
@app.route("/status")
def health_check():
return { "result": "OK - healthy" }
@app.route("/metrics")
def metrics():
return { "data": { "UserCount": 140, "UserCountActive": 23} }
if __name__ == "__main__":
app.run(host='0.0.0.0')