https://github.com/diptadeepray/website_on_local_server
Created a "basic" website using HTML, CSS and JS. Hosted the website on my local machine. The website is accessible by any device in the same Local Area Network.
https://github.com/diptadeepray/website_on_local_server
Last synced: about 1 month ago
JSON representation
Created a "basic" website using HTML, CSS and JS. Hosted the website on my local machine. The website is accessible by any device in the same Local Area Network.
- Host: GitHub
- URL: https://github.com/diptadeepray/website_on_local_server
- Owner: diptadeepray
- Created: 2024-12-22T09:23:41.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-22T09:52:20.000Z (over 1 year ago)
- Last Synced: 2025-02-23T01:13:14.784Z (over 1 year ago)
- Language: Python
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
To create virtual environment of python we need to write the following in the terminal:
python3 -m venv web_venv
web_venv is the name of the virtual environment
To activate virtual environment:
source web_venv/bin/activate
To make the website available on the Local Area Network:
The following command must be written in the terminal (inside the directory which contains all the files and folders + inside the virtual environment to access all the modules):
flask run --host=192.168.0.100 --port=5000
After this we can access the website from any device in the same Wi-Fi network using the following IP Address:
http://192.168.0.100:5000
You can get the IP Address of the Macbook by running the following command in my terminal:
ifconfig | grep inet
If we just write the following in the terminal:
flask run or
python3 app.py
Then the website will be only accessible from that local machine using the IP Address which looks like this:
http://127.0.0.1:5000