Arrange custom scripts for running applications.

This commit is contained in:
Luke Murphy 2018-11-18 12:27:26 +01:00
parent 0f76d1acad
commit 5c56aeca09
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
4 changed files with 11 additions and 4 deletions

View File

@ -29,5 +29,7 @@ pytest = "*"
tox = "*" tox = "*"
[scripts] [scripts]
dev = "python dev.py" devserver = "bash -c 'FLASK_APP=scripts/devserver.py flask run'"
prod = "gunicorn --worker-class eventlet -w 1 wsgi:app" devshell = "bash -c 'FLASK_APP=scripts/devshell.py flask shell'"
prodserver = "gunicorn --worker-class eventlet -w 1 wsgi:app"
prodshell = "bash -c 'FLASK_APP=wsgi.py flask shell'"

0
scripts/__init__.py Normal file
View File

View File

@ -1,7 +1,7 @@
"""Expose a development application.""" """Run a development application."""
from xppl.app import create_app
from xppl.socketio import socketio from xppl.socketio import socketio
from xppl.app import create_app
app = create_app('xppl.config.Development') app = create_app('xppl.config.Development')

5
scripts/devshell.py Normal file
View File

@ -0,0 +1,5 @@
"""Run a development shell."""
from xppl.app import create_app
app = create_app('xppl.config.Development')