Files
Local-Booru/run.py
T
Hell13Cat bdb9d599bd 5s
2026-05-26 21:28:43 +03:00

32 lines
637 B
Python

from system_module import db, gelbooru, logger
from flask import Flask, render_template
import json
CONFIG_ROOT = json.load(open("config.json", "r", encoding="utf-8"))
CONFIG_PORT = CONFIG_ROOT["port"]
app = Flask(__name__)
@app.route("/")
def index():
return render_template("index.html")
@app.route("/analytics")
def analytics():
return render_template("analytics.html")
@app.route("/post/<path:post_id>")
def post(post_id):
return render_template("post.html")
@app.route("/api", methods=["GET", "POST"])
def api():
return "", 204
if __name__ == "__main__":
app.run(host="0.0.0.0", port=CONFIG_PORT)