You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
615 B
25 lines
615 B
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)
|
|
|