Skip to content

Latest commit

 

History

History
67 lines (45 loc) · 1.15 KB

setup-without-docker.md

File metadata and controls

67 lines (45 loc) · 1.15 KB

Setup

Use this guide if you do NOT want to use Docker in your project.

Getting Started

Create and activate a virtual environment, and then install the requirements.

Set Environment Variables

Update project/server/config.py, and then run:

$ export APP_NAME="{{cookiecutter.app_name}}"
$ export APP_SETTINGS=project.server.config.ProductionConfig
$ export FLASK_DEBUG=0

By default the app is set to use the production configuration. If you would like to use the development configuration, you can alter the APP_SETTINGS environment variable:

$ export APP_SETTINGS=project.server.config.DevelopmentConfig

Create DB

$ python manage.py create-db
$ python manage.py db init
$ python manage.py db migrate
$ python manage.py create-admin
$ python manage.py create-data

Run the Application

$ python manage.py run

Access the application at the address http://localhost:5000/

Testing

Without coverage:

$ python manage.py test

With coverage:

$ python manage.py cov

Run flake8 on the app:

$ python manage.py flake

or

$ flake8 project