Spaces:
Sleeping
Sleeping
File size: 502 Bytes
2e76a54 0aaa677 2e76a54 0aaa677 2e76a54 0aaa677 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | import os
import sys
sys.path.append('.')
# Set environment variables to ensure SQLite is used
os.environ['NEON_DATABASE_URL'] = ''
os.environ['DATABASE_URL'] = 'sqlite:///./todo_app.db'
from src.main import create_app
import uvicorn
# Create the app instance with proper CORS configuration
app = create_app()
if __name__ == "__main__":
port = int(os.environ.get("PORT", 8000))
# Use 0.0.0.0 instead of 127.0.0.1 for external access on Render
uvicorn.run(app, host="0.0.0.0", port=port) |