kanban-app/backend/app/routes/home.py

17 lines
471 B
Python
Raw Normal View History

2026-03-15 12:52:44 +00:00
import os
from flask import Blueprint, jsonify, send_from_directory, current_app as app
home_bp = Blueprint("home", __name__)
@home_bp.route('/')
def serve_root():
return send_from_directory(app.static_folder, 'index.html')
@home_bp.route('/<path:path>')
def serve_spa(path):
if os.path.exists(os.path.join(app.static_folder, path)):
return send_from_directory(app.static_folder, path)
return send_from_directory(app.static_folder, 'index.html')