from flask import Flask, render_template from datetime import datetime import connexion import config from services import get_services # The application instance. app = config.connex_app # The yml file configures the app's endpoints. app.add_api("swagger.yml") @app.route("/") def home (): data = get_services.get_latest_status_for_all_devices() time = datetime.now() return render_template("home.html", data=data, time=time) @app.route("/robots.txt") @app.route("/robots") def robots(): return render_template("robots.txt") if __name__ == "__main__": app.run(host="0.0.0.0", debug=False)