Step 1 - Download the code from the GH repository (using
GIT
)
$ # Get the code
$ git clone https://**git url**
$ cd /path/to/directory/backend
Step 2 - Edit
.env
and setDEBUG=True
. This will activate theSQLite
persistance.
DEBUG=True
Step 3 - Start the APP in
Docker
$ docker-compose up --build
Visit http://localhost:5085
in your browser. The app should be up & running.
Download the code
$ # Get the code
$ git clone https://**git url**
$ cd /path/to/directory/backend
Install modules via
VENV
$ virtualenv env
$ source env/bin/activate
$ pip3 install -r requirements.txt
Set Up Flask Environment
$ export FLASK_APP=run.py
$ export FLASK_ENV=development
Start the app
$ flask run
At this point, the app runs at http://127.0.0.1:5000/
.
Install modules via
VENV
(windows)
$ virtualenv env
$ .\env\Scripts\activate
$ pip3 install -r requirements.txt
Set Up Flask Environment
$ # CMD
$ set FLASK_APP=run.py
$ set FLASK_ENV=development
$
$ # Powershell
$ $env:FLASK_APP = ".\run.py"
$ $env:FLASK_ENV = "development"
Start the app
$ flask run
At this point, the app runs at http://127.0.0.1:5000/
.
The project has a simple, intuitive structure presented bellow:
< PROJECT ROOT >
|-- instance
|-- nation.db
|-- media/
|-- < media files >
|-- nginx
|-- appseed-app.conf
|-- app/
|-- api/
|-- < Api files >
|-- models/
|-- < Model Files files >
|-- views/
| |-- < Api files >
|-- static/
| | |-- <css, JS, images>
| |
|-- templates/
| |-- < Jinja template page files >
|-- __init__.py
|-- config.py
|-- extensions.py
|-- utils.py
|
|-- requirements.txt
|
|-- CHANGELOG.md
|
|-- Dockerfile
|
|-- docker-compose.yaml
|
|-- gunicorn-cfg.py
|
|-- LICENCE.md
|
|-- log.json
|
|-- Procfile
|
|-- README.md
|
|-- run.py
|
|-- runtime.txt
|
|-- ************************************************************************