![]() |
VOOZH | about |
In this article, we are going to learn how to set up a simple and local HTTP server using Python. An HTTP server can be very useful for testing Android, PC, or Web apps locally during development. It can also be used to share files between two devices connected over the same LAN or WLAN network.
Installation:
On the terminal run the following statement:
python -m http.server
For accessing the server locally we need to visit http://localhost:8000/ or http://127.0.0.1:8000/ Here we can see all the directories of your local storage along with all the data. You can also access an HTML page, It will be rendered by your web browser as you access it.
👁 ImageFunctions Used:
Step-by-step Approach:
Implementation:
How to start our HTTP-Server:
Use the following command in the terminal
python file_name.py👁 Image
In the browser go to or http://127.0.0.1:5555/
👁 Image