29 lines
645 B
Python
29 lines
645 B
Python
import platform
|
|
from datetime import datetime, timezone
|
|
|
|
from flask import Flask, jsonify, render_template
|
|
import flask
|
|
|
|
|
|
VERSION = "0.0.1"
|
|
app = Flask(__name__, template_folder="templates", static_folder="static")
|
|
|
|
|
|
@app.route("/")
|
|
def index():
|
|
return render_template(
|
|
"index.html",
|
|
version=VERSION,
|
|
current_time=datetime.now(timezone.utc).isoformat(),
|
|
python_version=platform.python_version(),
|
|
flask_version=flask.__version__,
|
|
)
|
|
|
|
|
|
@app.route("/health")
|
|
def health():
|
|
return jsonify(status="ok", version=VERSION)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
app.run(debug=True, host="0.0.0.0", port=5000) |