kappa123/README.md

65 lines
1.0 KiB
Markdown
Raw Permalink Normal View History

2015-01-21 08:32:17 -08:00
# Flask Skeleton
2015-01-21 08:35:34 -08:00
Flask starter project...
2015-01-21 08:32:17 -08:00
2015-01-21 08:36:54 -08:00
[![Build Status](https://travis-ci.org/realpython/flask-skeleton.svg?branch=master)](https://travis-ci.org/realpython/flask-skeleton)
2015-01-21 08:32:17 -08:00
## Quick Start
### Basics
2017-02-05 10:51:30 -08:00
1. Create and activate a virtualenv
2016-03-12 14:57:43 -08:00
1. Install the requirements
2015-01-21 08:32:17 -08:00
### Set Environment Variables
2016-03-12 14:57:43 -08:00
Update *project/server/config.py*, and then run:
2015-01-21 08:32:17 -08:00
```sh
$ export APP_SETTINGS="project.server.config.DevelopmentConfig"
2015-01-21 08:32:17 -08:00
```
or
```sh
$ export APP_SETTINGS="project.server.config.ProductionConfig"
2015-01-21 08:32:17 -08:00
```
### Create DB
```sh
$ 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
```sh
$ python manage.py runserver
```
2015-01-22 15:18:43 -08:00
So access the application at the address [http://localhost:5000/](http://localhost:5000/)
2016-04-09 10:48:35 -07:00
> Want to specify a different port?
2016-04-09 10:47:57 -07:00
2016-04-09 10:48:35 -07:00
> ```sh
> $ python manage.py runserver -h 0.0.0.0 -p 8080
> ```
2015-01-22 15:18:43 -08:00
### Testing
Without coverage:
```sh
$ python manage.py test
```
With coverage:
```sh
$ python manage.py cov
```