OniiOniiChan/LogisticsDataExtractionValidationSystem
0
1"""2Main entry point for the Logistics Data Extraction application.3Run: python run.py4"""5 6import os7import sys8from pathlib import Path9 10# Ensure the project root is in the path11project_root = Path(__file__).parent12sys.path.insert(0, str(project_root))13 14from backend.app import create_app15 16if __name__ == '__main__':17 # Create Flask app18 app = create_app()19 20 # Get configuration - Railway provides PORT env var21 host = os.getenv('FLASK_HOST', '0.0.0.0')22 port = int(os.getenv('PORT', os.getenv('FLASK_PORT', 5000)))23 debug = os.getenv('FLASK_DEBUG', 'False').lower() == 'true'24 25 # Run the app26 print(f"๐ Starting Logistics Data Extraction Server...")27 print(f"๐ Host: {host}")28 print(f"๐ Port: {port}")29 print(f"๐ Debug: {debug}")30 print(f"๐ Frontend: http://localhost:{port}")31 print(f"๐ก API: http://localhost:{port}/api/extract-all")32 print(f"\nPress CTRL+C to stop the server...\n")33 34 app.run(host=host, port=port, debug=debug)35 