Just followed the tutorial of django-channels https://channels.readthedocs.io/en/latest/tutorial/index.html