🎉 Renamed IHK_Projektdokumentation/Ausarbeitungsprozess/Dokumentation.md to IHK_Projektdokumentation/Dokumentation_Final_Markdown/Dokumentation.md
This commit is contained in:
24
backend/run_optimized.py
Normal file
24
backend/run_optimized.py
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/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
|
||||
)
|
||||
Reference in New Issue
Block a user