Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To access a Flask server on other devices within the same network, you need to follow these steps:

  1. Get the IP address of the machine that the Flask server is running on. You can do this by running ipconfig or ifconfig in the terminal.

  2. Start the Flask server by running flask run in the terminal. Make sure that the server is configured to listen on all addresses by using flask run --host=0.0.0.0.

  3. On the other device, open a web browser and enter the IP address of the machine running the Flask server, followed by the port number that the Flask server is running on. For example: http://192.168.0.10:5000.

  4. If everything is set up correctly, you should be able to access the Flask server on the other device within the same network.