import os import sys from flask import Flask, render_template_string import markdown app = Flask(__name__) @app.route('/') @app.route('/health') def health_check(): try: readme_path = os.path.join(os.path.dirname(__file__), '..', 'README.md') verification_path = os.path.join(os.path.dirname(__file__), '..', 'VERIFICATION.md') readme_content = "" if os.path.exists(readme_path): with open(readme_path, 'r', encoding='utf-8') as f: readme_content = f.read() verification_content = "" if os.path.exists(verification_path): with open(verification_path, 'r', encoding='utf-8') as f: verification_content = f.read() html_readme = markdown.markdown(readme_content) if readme_content else "
README.md not found.
" html_verification = markdown.markdown(verification_content) if verification_content else "VERIFICATION.md not found.
" return render_template_string("""MQL5 Trading Automation is running.
{{ html_verification|safe }}