mirror of
https://github.com/ovosimpatico/xtream2m3u.git
synced 2026-01-15 16:32:55 -03:00
This commit is contained in:
12
run.py
12
run.py
@@ -13,6 +13,12 @@ from app.utils import setup_custom_dns
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Initialize custom DNS resolver globally so it runs for Gunicorn too
|
||||
setup_custom_dns()
|
||||
|
||||
# Create the Flask app globally so Gunicorn can find 'app'
|
||||
app = create_app()
|
||||
|
||||
|
||||
def main():
|
||||
"""Main entry point for the application"""
|
||||
@@ -23,12 +29,6 @@ def main():
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
# Initialize custom DNS resolver
|
||||
setup_custom_dns()
|
||||
|
||||
# Create the Flask app
|
||||
app = create_app()
|
||||
|
||||
# Run the app
|
||||
logger.info(f"Starting Xtream2M3U server on port {args.port}")
|
||||
app.run(debug=True, host="0.0.0.0", port=args.port)
|
||||
|
||||
Reference in New Issue
Block a user