mirror of
https://github.com/ovosimpatico/xtream2m3u.git
synced 2026-01-15 08:22:56 -03:00
Merge pull request #13 from Jiteshprm/main
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 9s
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 9s
Add argument parser for Flask app port configuration
This commit is contained in:
9
run.py
9
run.py
@@ -7,6 +7,7 @@ import re
|
||||
import socket
|
||||
import time
|
||||
import urllib.parse
|
||||
import argparse
|
||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||
|
||||
import dns.resolver
|
||||
@@ -780,4 +781,10 @@ def generate_m3u():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(debug=True, host="0.0.0.0")
|
||||
parser = argparse.ArgumentParser(description="Run the Flask app.")
|
||||
parser.add_argument(
|
||||
"--port", type=int, default=5000, help="Port number to run the app on"
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
app.run(debug=True, host="0.0.0.0", port=args.port)
|
||||
|
||||
Reference in New Issue
Block a user