Files
kennethreitz.org/engine.py
T
kennethreitz f50dad4574 Switch to uvicorn, fix breadcrumbs for all content pages
- Replace gunicorn/gevent with uvicorn for ASGI support
- Add asgiref to wrap Flask WSGI app for uvicorn compatibility
- Enable auto-reload in docker-compose for development
- Add current_path to all content render_template calls
- Simplify breadcrumb template to exclude current page
- Only show breadcrumbs for nested paths (> 1 segment)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 16:58:17 -05:00

24 lines
661 B
Python

#!/usr/bin/env python
"""
TufteCMS Engine - Main application entry point.
This file serves as the entry point for the TufteCMS application.
All the core functionality has been modularized into the tuftecms package.
"""
import os
from asgiref.wsgi import WsgiToAsgi
from tuftecms import create_app
# Create the Flask application using the factory pattern
flask_app = create_app()
# Wrap Flask WSGI app for ASGI compatibility (uvicorn)
app = WsgiToAsgi(flask_app)
if __name__ == "__main__":
# Run the development server
import uvicorn
port = int(os.environ.get("PORT", 8000))
uvicorn.run("engine:app", host="0.0.0.0", port=port, reload=True)