- Extensive updates to system configuration and deployment - Enhanced documentation and architecture improvements - Updated dependencies and build configurations - Improved service integrations and workflows 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
68 lines
2.0 KiB
Python
Executable File
68 lines
2.0 KiB
Python
Executable File
#!/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/<path:filename>')
|
|
def logos(filename):
|
|
"""Serve logo files"""
|
|
return send_from_directory(BASE_DIR / 'logos', filename)
|
|
|
|
@app.route('/fonts/<path:filename>')
|
|
def fonts(filename):
|
|
"""Serve font files"""
|
|
return send_from_directory(BASE_DIR / 'fonts', filename)
|
|
|
|
@app.route('/icons/<path:filename>')
|
|
def icons(filename):
|
|
"""Serve icon files"""
|
|
return send_from_directory(BASE_DIR / 'icons', filename)
|
|
|
|
@app.route('/brand-style-guide-site/<path:filename>')
|
|
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/<path:filename>')
|
|
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"<h1>404 - File Not Found</h1><p>The requested resource was not found.</p>", 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
|
|
) |