/flask-skeleton

Flask Starter Project

Primary LanguagePythonMIT LicenseMIT

Flask Skeleton

Flask starter project...

Build Status

Quick Start

Basics

Create virtual environment and install requirements via pipenv extension Enter everything without double slashes

$ sudo -H pip3 install pipenv   // Install pipenv library
$ cd xxx/flask-skeleton         // Go to the flask-skeleton folder
$ pipenv install                // Create virtual environment and install all packages
$ pipenv shell                  // Activate virtual environment
$ export FLASK_APP=flasky.py    // Set environmnt variable
$ flask run                     // Run flask server

Change config settings

$ export APP_SETTINGS="project.server.config.DevelopmentConfig"

or

$ export APP_SETTINGS="project.server.config.ProductionConfig"

Create DB

$ flask create_db
$ flask db init
$ flask db migrate
$ flask create_admin
$ flask create_data

Run the Application

$ flask run

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

Testing

Without coverage:

$ flask test

With coverage:

$ flask cov