mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-16 01:44:51 +03:00
Fix async runserver command with Gulp/Webpack
This commit is contained in:
parent
121d4d347f
commit
ccf6070d7f
|
@ -180,7 +180,7 @@ def handle_js_runner(choice, use_docker, use_async):
|
|||
]
|
||||
if not use_docker:
|
||||
dev_django_cmd = (
|
||||
"gunicorn config.asgi -k uvicorn.workers.UvicornWorker --reload"
|
||||
"uvicorn config.asgi:application --reload"
|
||||
if use_async
|
||||
else "python manage.py runserver_plus"
|
||||
)
|
||||
|
|
|
@ -104,12 +104,9 @@ function imgCompression() {
|
|||
{%- if cookiecutter.use_async == 'y' -%}
|
||||
// Run django server
|
||||
function asyncRunServer() {
|
||||
var cmd = spawn('gunicorn', [
|
||||
'config.asgi', '-k', 'uvicorn.workers.UvicornWorker', '--reload'
|
||||
], {stdio: 'inherit'}
|
||||
)
|
||||
var cmd = spawn('uvicorn', ['config.asgi:application', '--reload'], {stdio: 'inherit'})
|
||||
cmd.on('close', function(code) {
|
||||
console.log('gunicorn exited with code ' + code)
|
||||
console.log('uvicorn exited with code ' + code)
|
||||
})
|
||||
}
|
||||
{%- else %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user