45 lines
1.3 KiB
Python
45 lines
1.3 KiB
Python
"""
|
|
Domain Check API - Entry Point
|
|
Version: 1.0.0
|
|
"""
|
|
import os
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
# Add app directory to Python path
|
|
sys.path.insert(0, str(Path(__file__).parent))
|
|
|
|
from app import create_app
|
|
|
|
# Create Flask app instance
|
|
app = create_app(os.getenv('FLASK_ENV', 'development'))
|
|
|
|
if __name__ == '__main__':
|
|
host = os.getenv('API_HOST', '0.0.0.0')
|
|
port = int(os.getenv('API_PORT', 5000))
|
|
debug = os.getenv('DEBUG', 'True').lower() == 'true'
|
|
|
|
print(f"""
|
|
╔══════════════════════════════════════════╗
|
|
║ Domain Check API - Anti-Fake News ║
|
|
║ Version: 1.0.0 ║
|
|
║ Environment: {os.getenv('FLASK_ENV', 'development'):<26}║
|
|
║ Host: {host:<32}║
|
|
║ Port: {port:<32}║
|
|
╚══════════════════════════════════════════╝
|
|
|
|
📚 API Documentation:
|
|
- Swagger UI: http://{host}:{port}/docs
|
|
- ReDoc: http://{host}:{port}/redoc
|
|
|
|
🏥 Health Check: http://{host}:{port}/health
|
|
|
|
🚀 Starting server...
|
|
""")
|
|
|
|
app.run(
|
|
host=host,
|
|
port=port,
|
|
debug=debug,
|
|
threaded=True
|
|
)
|