19 lines
676 B
Python
19 lines
676 B
Python
#!/usr/bin/env python3
|
|
"""
|
|
Main entry point for the Markov Economics Flask application.
|
|
Demonstrates how capitalism "eats the world" using Markov chains.
|
|
"""
|
|
|
|
import os
|
|
from app import create_app, socketio
|
|
|
|
# Use FLASK_ENV if set, otherwise default to development
|
|
config_name = os.getenv('FLASK_ENV', 'development')
|
|
app = create_app(config_name)
|
|
|
|
if __name__ == '__main__':
|
|
debug_mode = config_name == 'development'
|
|
port = int(os.getenv('PORT', 5000)) # Use PORT env var or default to 5000
|
|
|
|
# Run with SocketIO's built-in server for both development and production
|
|
socketio.run(app, debug=debug_mode, host='0.0.0.0', port=port, allow_unsafe_werkzeug=True) |