Go to the mobile browser and type the .X:5000 Type ipconfig and get the get the IPV4 adress suppose your IPV4 address is .X Run your app by using the following command If you run your app in this way then your server will be visible externally. Specify host and port inside app.run() without the debug = True. ![]() If you have debug = True inside your app.run(), then it will not be visible to other machines either. ![]() On the same network, go to address]:5000 Solution 3:Ī reason could also be in firewall refusing incoming connections on port 5000. To connect, find the IPV4 address of the server that your script is running on. When you are running the server via flask run change it to flask run -host=0.0.0.0 If the IP address of the machine is .X then, from the same network you can access it in 5000 port. It will make the server externally visible. Run your app like this: if _name_ = '_main_': What do I need to do to connect from another computer? How to solve the problem: Solution 1: I can open 127.0.0.1:5000 on the Raspberry Pi’s browser. ![]() When I run my Flask app, it says:īut when I enter this address on my laptop’s in Chrome, I get ![]() I’m trying to run a simple web server on a Raspberry Pi with Flask. Question or problem about Python programming:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |