Skip to content

Flask-Planet/EXA-Sub-Domain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EXA-Sub-Domain

(EXA, Example)

Contains a working example of using Sub Domains.

Attribution

CheeseCake87 (David Carmichael)

License

See: LICENSE

Viewing the source code of this project acknowledges that you have read and understood the license.

Setup

(This assumes you have Python installed)

  1. Download or Clone this repository.
  2. 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

Linux

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

Windows

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

Post Setup

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)