Reputation: 223
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.
Upvotes: 3
Views: 3446
Reputation: 13057
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
Upvotes: 2