alertmanager-bark-hook/test.py
2022-08-15 13:51:23 +08:00

16 lines
317 B
Python

#!/usr/bin/env python3
from flask import Flask, render_template
import json
app = Flask("test", template_folder="config")
data = {}
with open("alert-test.json") as f:
data = json.load(f)
@app.route("/")
def index():
return render_template("text_template.tpl", **data)
app.run(host="127.0.0.1", port=5003)