Strip to minimal: single route, static HTML, no logic
This commit is contained in:
+7
-11
@@ -1,18 +1,14 @@
|
||||
"""Точка входа — запускается как 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", "")
|
||||
from flask import Flask, render_template
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config["NUBES_API_ENDPOINT"] = NUBES_API_ENDPOINT
|
||||
app.config["NUBES_API_TOKEN"] = NUBES_API_TOKEN
|
||||
app.register_blueprint(main_bp)
|
||||
|
||||
|
||||
@app.route("/")
|
||||
def index():
|
||||
return render_template("index.html")
|
||||
|
||||
Reference in New Issue
Block a user