setup daphne and django channels to replace runserver

This commit is contained in:
Nick Sweeting 2024-09-05 21:45:43 -07:00
parent a190745f36
commit 00aa7dc19f
No known key found for this signature in database
4 changed files with 438 additions and 102 deletions

View file

@ -1335,9 +1335,9 @@ def server(runserver_args: Optional[List[str]]=None,
print(' archivebox manage createsuperuser')
print()
# fallback to serving staticfiles insecurely with django when DEBUG=False
if not config.DEBUG:
runserver_args.append('--insecure') # TODO: serve statics w/ nginx instead
# fallback to serving staticfiles insecurely with django when DEBUG=False (not compatible with daphne)
# if not config.DEBUG:
# runserver_args.append('--insecure') # TODO: serve statics w/ nginx instead
# toggle autoreloading when archivebox code changes (it's on by default)
if not reload: