import os
from flask import Flask, render_template

app = Flask(__name__)

@app.route('/')
def hello_world():
    return render_template('index.html')

# SSL configuration
try:
    certificate_path = os.environ['ARTICONF_CERTIFICATE_PATH']
except KeyError:
    certificate_path = '/srv/articonf/'
context = (os.path.normpath(f'{certificate_path}/articonf1.crt'), os.path.normpath(f'{certificate_path}/articonf1.key')) # certificate and key files

app.run(host='0.0.0.0', port=5000, debug=False, ssl_context=context)
