bdd181425b
Docker Compose project with automated Playwright benchmarks comparing django-liveview 2.2.0 against Phoenix LiveView 1.0 across 6 scenarios.
20 lines
502 B
Python
20 lines
502 B
Python
import os
|
|
import django
|
|
|
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")
|
|
django.setup()
|
|
|
|
from channels.routing import ProtocolTypeRouter, URLRouter
|
|
from django.core.asgi import get_asgi_application
|
|
from django.urls import path
|
|
from app.consumers import BenchmarkConsumer
|
|
|
|
application = ProtocolTypeRouter(
|
|
{
|
|
"http": get_asgi_application(),
|
|
"websocket": URLRouter(
|
|
[path("ws/liveview/<str:room_name>/", BenchmarkConsumer.as_asgi())]
|
|
),
|
|
}
|
|
)
|