Restructure: site/ with modular code, matching Nubes Flask convention

This commit is contained in:
2026-07-23 10:48:14 +04:00
parent 51e4d7a4f6
commit 420d09e6b5
17 changed files with 21 additions and 39 deletions
+18
View File
@@ -0,0 +1,18 @@
"""Точка входа — запускается как python site/app.py."""
import os
import sys
# site/ не может быть пакетом (конфликт с stdlib site.py)
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from flask import Flask
from routes.main import bp as main_bp
NUBES_API_ENDPOINT = os.getenv("NUBES_API_ENDPOINT", "https://lk-api-gateway-dev.ngcloud.ru/api/v1/svc")
NUBES_API_TOKEN = os.getenv("NUBES_API_TOKEN", "")
app = Flask(__name__)
app.config["NUBES_API_ENDPOINT"] = NUBES_API_ENDPOINT
app.config["NUBES_API_TOKEN"] = NUBES_API_TOKEN
app.register_blueprint(main_bp)