Lin / starty.py
Zelyanoth's picture
jj
5f61057
raw
history blame contribute delete
977 Bytes
#!/usr/bin/env python3
"""
Entry point for the Lin application.
This script imports and runs the backend Flask application directly.
"""
import os
import sys
if __name__ == '__main__':
# Set the port for development
port = os.environ.get('PORT', '5000')
os.environ.setdefault('PORT', port)
print(f"Starting Lin application on port {port}...")
try:
# Add the current directory to Python path so we can import backend modules
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
# Import and run the backend Flask app directly
from backend.app import create_app
app = create_app()
app.run(
host='0.0.0.0',
port=int(port),
debug=True # Enable debug mode for development
)
except Exception as e:
print(f"Failed to start Lin application: {e}")
import traceback
traceback.print_exc()
sys.exit(1)