run.py 331 B

123456789101112131415
  1. import os
  2. from app import app
  3. from typing import Any
  4. if __name__ == "__main__":
  5. import argparse
  6. parser = argparse.ArgumentParser()
  7. parser.add_argument('--port', type=int, default=8080)
  8. args: Any = parser.parse_args()
  9. port: int = int(os.environ.get('PORT', args.port))
  10. app.run(host='0.0.0.0', port=port)