2023-05-22 18:29:08 +02:00
|
|
|
from flask import Flask
|
|
|
|
|
|
|
|
app = Flask(__name__)
|
|
|
|
|
|
|
|
@app.route('/')
|
|
|
|
def main():
|
2023-05-22 19:04:32 +02:00
|
|
|
return 'Hello World! 2', 200
|
2023-05-22 18:29:08 +02:00
|
|
|
|
|
|
|
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)
|