import os from App import create_app # Ensure your folder name is 'App' or 'app' # Get the directory where run.py is located basedir = os.path.abspath(os.path.dirname(__file__)) # Create the application instance app = create_app() # Override paths to be relative to run.py location # NOTE: Check if your folders are 'Static' or 'static' (Linux is case-sensitive!) app.static_folder = os.path.join(basedir, 'Static') app.template_folder = os.path.join(basedir, 'Templates') @app.route('/debug-paths') def debug_paths(): return f"""
Base Directory: {basedir}
Static Folder: {app.static_folder} ({'✅ Found' if os.path.exists(app.static_folder) else '❌ Not Found'})
Template Folder: {app.template_folder} ({'✅ Found' if os.path.exists(app.template_folder) else '❌ Not Found'})