diff --git a/Pipfile b/Pipfile index 8af201c..350cb80 100644 --- a/Pipfile +++ b/Pipfile @@ -29,5 +29,7 @@ pytest = "*" tox = "*" [scripts] -dev = "python dev.py" -prod = "gunicorn --worker-class eventlet -w 1 wsgi:app" +devserver = "bash -c 'FLASK_APP=scripts/devserver.py flask run'" +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'" diff --git a/scripts/__init__.py b/scripts/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/dev.py b/scripts/devserver.py similarity index 76% rename from dev.py rename to scripts/devserver.py index 9c84965..23be097 100644 --- a/dev.py +++ b/scripts/devserver.py @@ -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.app import create_app app = create_app('xppl.config.Development') diff --git a/scripts/devshell.py b/scripts/devshell.py new file mode 100644 index 0000000..c4d8164 --- /dev/null +++ b/scripts/devshell.py @@ -0,0 +1,5 @@ +"""Run a development shell.""" + +from xppl.app import create_app + +app = create_app('xppl.config.Development')