My flask app has a router as shown below:
@app.route('/test', methods=['GET'])
def testfunction():
return("Hello world")
when I try to reach it from my pc (which is the host of the app) it runs up as shown below: by typing: http://<My_IP_Address>:5000/test
But when I try to reach the same app from my smart phone browser, it says this site can't be reached connection timed out.
my main code snippet is as shown below:
if __name__ == '__main__':
app.run(host='0.0.0.0',port=5000)
I solved the problem from changing IPV4 Address of ethernet adapter to Wireless LAN Adapter IPV4 address. Does anyone know why was this happening? And what's the right IP address to use to enable your app listen globally
Note that I am using windows system.
This is my ipconfig result. Which IP should I use?