alertmanager-bark-hook/test.py

16 lines
317 B
Python
Raw Normal View History

2022-08-15 05:51:23 +00:00
#!/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)