add config file

This commit is contained in:
2025-08-10 19:31:00 +03:00
parent 4c2877403d
commit 1c80777fe4
4 changed files with 6 additions and 3 deletions

View File

@ -13,6 +13,7 @@ from datetime import datetime
import os
import time
import secrets
import tomllib
def create_default_avatar():
if Avatars.count() == 0:
@ -48,6 +49,7 @@ def create_deleted_user():
def create_app():
app = Flask(__name__)
app.config.from_file('../config/pyrom_config.toml', load=tomllib.load, text=False)
if os.getenv("PYROM_PROD") is None:
app.static_folder = os.path.join(os.path.dirname(__file__), "../data/static")