25 lines
666 B
Python
25 lines
666 B
Python
#!/usr/bin/env python3
|
|
"""
|
|
Optimized MYP Platform runner for Raspberry Pi
|
|
"""
|
|
import os
|
|
os.environ['OPTIMIZED_MODE'] = 'true'
|
|
os.environ['FLASK_ENV'] = 'production'
|
|
|
|
from app import create_app
|
|
from config_optimized import OptimizedConfig
|
|
|
|
# Create app with optimized config
|
|
app = create_app(OptimizedConfig)
|
|
|
|
if __name__ == '__main__':
|
|
# Run with optimized settings
|
|
app.run(
|
|
host='0.0.0.0', # Allow external connections
|
|
port=5000,
|
|
debug=False,
|
|
use_reloader=False, # Disable reloader for performance
|
|
threaded=True, # Enable threading for better performance
|
|
processes=1 # Single process to save memory
|
|
)
|