#!/usr/bin/env python3 """ CHORUS Brand Style Guide Server Simple Flask server to serve the brand style guide HTML file """ from flask import Flask, send_file, send_from_directory import os from pathlib import Path app = Flask(__name__) # Get the directory where this script is located BASE_DIR = Path(__file__).parent @app.route('/') def index(): """Serve the main brand style guide HTML file""" return send_file(BASE_DIR / 'chorus_brand_style_guide.html') @app.route('/favicon.ico') def favicon(): """Serve favicon""" return send_from_directory(BASE_DIR, 'favicon.ico', mimetype='image/vnd.microsoft.icon') @app.route('/logos/') def logos(filename): """Serve logo files""" return send_from_directory(BASE_DIR / 'logos', filename) @app.route('/fonts/') def fonts(filename): """Serve font files""" return send_from_directory(BASE_DIR / 'fonts', filename) @app.route('/icons/') def icons(filename): """Serve icon files""" return send_from_directory(BASE_DIR / 'icons', filename) @app.route('/brand-style-guide-site/') def brand_site_assets(filename): """Serve brand style guide site assets""" return send_from_directory(BASE_DIR / 'brand-style-guide-site', filename) @app.route('/static/') def static_files(filename): """Serve any static files""" return send_from_directory(BASE_DIR, filename) @app.errorhandler(404) def not_found(error): """Handle 404 errors""" return f"

404 - File Not Found

The requested resource was not found.

", 404 if __name__ == '__main__': print("🎨 CHORUS Brand Style Guide Server") print("📍 Serving brand assets from:", BASE_DIR) print("🌐 Server will be available at: http://localhost:8000") print("📄 Main guide: http://localhost:8000") print("⚡ Press Ctrl+C to stop") app.run( host='0.0.0.0', # Allow external connections port=8000, debug=True, use_reloader=False # Prevent double startup in debug mode )