mirror of
https://github.com/kennethreitz/kennethreitz.org.git
synced 2026-06-05 22:50:17 +00:00
f50dad4574
- 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>
24 lines
661 B
Python
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)
|