test/hello.py

16 lines
338 B
Python

from flask import Flask
app = Flask(__name__)
@app.route('/')
def main():
return 'Hello World! 3', 200
if __name__ == '__main__':
import os
HOST = os.environ.get('SERVER_HOST', 'localhost')
try:
PORT = int(os.environ.get('SERVER_PORT', '6060'))
except ValueError:
PORT = 6060
app.run(HOST, PORT)