How to change eve's IP address?

孤街醉人 提交于 2019-12-02 02:39:00

问题


When I run the api.py the default IP address is 127.0.0.1:5000 which is the local host. I am running the eve scripts on the server side. Am I able to change that IP address to server's address? or Am I just access it using server's address.

For example, if the server's address is 11.5.254.12, then I run the api.py. Am I able to access it outside of the server using 11.5.254.12:5000 or is there any way to change it from 127.0.0.1 to 11.5.254.12?


回答1:


Add a parameter to your app.run(). By default it runs on localhost, change it to app.run(host= '0.0.0.0') to run on your machine IP address.



来源:https://stackoverflow.com/questions/40681689/how-to-change-eves-ip-address

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!