2021年4月24日星期六

Flask assign public IP

I am trying to make my api to be have public IP using waitress or normal flask connection but I can not.

app = Flask(__name__)    mysql = MySQL()  @app.route('/')  def index():      return "Hello, world!"  if __name__ == "__main__":      # waitress.serve(app=app, host="0.0.0.0", port=5013)      app.run(host="10.0.0.5", port=5013, debug=True, threaded=True)  

I can access it from my machine only. but when I try to access from outside(i.e any phone or tablet) I cant reach it.

https://stackoverflow.com/questions/67249225/flask-assign-public-ip April 25, 2021 at 10:30AM

没有评论:

发表评论