While building and running server to see the outcome of the site you have built you have been using a magical command :
And it will generate the server in the localhost 8080 as http://localhost:8080 or http://127.0.0.1
And with that you can visit that url in your device(host) from whichever browser you want and it will give the response as the site you created (Of course, given that you have the page built in ' ' url in urls.py)
But today I am going to show you how you can generate the url such that it can be viewed by any device within your Local Network from whichever devices you want provided that the device is connected to same network to the host device with the website built.
To do so, nothing more is required, just slight changes in command will work for you:
After that all you need to do is to open the url with the network IP address and add the port 8080
For example: If your IP address is 192.168.1.101
URL for the site will be http://192.168.1.101:8080
You can view your IP address by using ipconfig command using cmd:
Your network IP address will be in Wireless LAN adapter Wi-Fi - IPv4 section, if your connection to that device is wireless.
Comments
Post a Comment