flask set access address and access port

app.run()


Four parameters

host: The host can be set to a local or other IP

port: Port, is run () to start the service when the specified port operation,

debug: debug, if you need to enter debug mode, this option can be set to True

options: Option parameter is a parameter server to transfer to Werkzeug server to deal with. For more details, refer to the linked content.

http://werkzeug.pocoo.org/docs/0.11/serving/#werkzeug.serving.run_simple

example:

app.run(debug=True,host='1.2.3.4',port=5003)

 

Guess you like

Origin www.cnblogs.com/mafeng/p/11404481.html