I have started using django_channels on my server. But if I want the websocket to work, I have to use:
python manage.py runserver 0.0.0.0:8080
And the server runs and I can connect ws://myip:8080
But, as soon as I do ctrl+c. It quits i.e, I am unable to connect on ws://myip:8080 anymore.
I want to be running continuously.
You can keep it running in background without hanging up. Just use below command.
nohup python manage.py runserver 0.0.0.0:8080 &
To kill
Find pid running on port 8080
netstat -nlp | grep :8080
and then after you get pid
kill pidnumber
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With