FreeBSD/k8s/apps/pyserver/app.py

15 lines
282 B
Python
Raw Permalink Normal View History

2021-04-20 12:34:43 -07:00
from flask import Flask
import os
app = Flask(__name__)
@app.route('/')
def hello_world(count=0):
count += 1
return "Hello World! #" + str(count) + "\nfrom: " + os.getenv('HOSTNAME', "unknown") + "\n"
if __name__ == '__main__':
app.run(host='0.0.0.0', port='8080')