(EXA, Example)
Contains a working example of using Sub Domains.
CheeseCake87 (David Carmichael)
See: LICENSE
Viewing the source code of this project acknowledges that you have read and understood the license.
(This assumes you have Python installed)
- Download or Clone this repository.
- Open terminal (Linux) / powershell (Windows) and cd to the directory of the project.
# Linux
cd /path/to/EXA-Sub-Domain
# Windows
cd C:\path\to\EXA-Sub-Domain
Create a virtual environment and activate it.
python3 -m venv venv
source venv/bin/activate
Install the requirements.
pip install -r requirements.txt
run
flask run
or
python3 run.py
Create a virtual environment and activate it.
python -m venv venv
.\venv\Scripts\activate
Install the requirements.
pip install -r requirements.txt
run
flask run
or
python run.py
Add the following to your hosts
file:
127.0.0.1 site.local
127.0.0.1 subdomain.site.local
Visit http://site.local:5000
and http://subdomain.site.local:5000
to see the results.
Linux most common hosts
file location
/etc/hosts
(open with sudo if needed, edit, then save)
Windows hosts
file location
c:\Windows\System32\drivers\etc\hosts
(copy to desktop, edit, then paste back to folder)