kaku21 kaku21 - 1 year ago 200
Python Question

flask manage.py runserver can't pass parameter

user manager.py runserver my flask webframework can start on but it can not access on other computer in network.
so i need use an open IP in network.
although i use bellow command:

manage.py runserver

it can not run and give a error info:

manage.py: error: unrecognized arguments:

I don't known what's wrong with it??

Answer Source

Read the documentation:

Externally Visible Server If you run the server you will notice that the server is only accessible from your own computer, not from any other in the network. This is the default because in debugging mode a user of the application can execute arbitrary Python code on your computer.

If you have debug disabled or trust the users on your network, you can make the server publicly available simply by changing the call of the run() method to look like this:

app.run(host='') This tells your operating system to listen on all public IPs.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download