Ask Your Question
4

How can I access Flask Server on other devices within the same network?

asked 2023-06-18 02:13:35 +0000

nofretete gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-06-18 02:41:02 +0000

bukephalos gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-18 02:13:35 +0000

Seen: 21 times

Last updated: Jun 18 '23