From cc099ae941a6136da9dfd5dd24ce41766fd720cb Mon Sep 17 00:00:00 2001 From: Andrew-Chen-Wang Date: Mon, 13 Apr 2020 11:26:09 -0400 Subject: [PATCH] Edited docs for local running async --- docs/developing-locally.rst | 6 +++++- {{cookiecutter.project_slug}}/compose/local/django/start | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/developing-locally.rst b/docs/developing-locally.rst index 7a58d099..dae14f6a 100644 --- a/docs/developing-locally.rst +++ b/docs/developing-locally.rst @@ -68,10 +68,14 @@ First things first. $ python manage.py migrate -#. See the application being served through Django development server: :: +#. If you're running synchronously, see the application being served through Django development server: :: $ python manage.py runserver 0.0.0.0:8000 +or if you're running asynchronously: :: + + $ gunicorn config.asgi --bind 0.0.0.0:8000 -k uvicorn.workers.UvicornWorker --reload + .. _PostgreSQL: https://www.postgresql.org/download/ .. _Redis: https://redis.io/download .. _createdb: https://www.postgresql.org/docs/current/static/app-createdb.html diff --git a/{{cookiecutter.project_slug}}/compose/local/django/start b/{{cookiecutter.project_slug}}/compose/local/django/start index 129266c8..9c0b43d1 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/start +++ b/{{cookiecutter.project_slug}}/compose/local/django/start @@ -7,7 +7,7 @@ set -o nounset python manage.py migrate {%- if cookiecutter.use_async == 'y' %} -/usr/local/bin/gunicorn config.asgi --bind 0.0.0.0:8000 --chdir=/app -k uvicorn.workers.UvicornWorker -e DJANGO_SETTINGS_MODULE=config.settings.local --reload +/usr/local/bin/gunicorn config.asgi --bind 0.0.0.0:8000 --chdir=/app -k uvicorn.workers.UvicornWorker --reload {%- else %} python manage.py runserver_plus 0.0.0.0:8000 {% endif %}