Recent I am running Django project on terminal using this command:
python manage.py runserver 0.0.0.0:80
But Server is stopped by closing terminal, So I need to run server in background. How can I solve this issue?
CodePudding user response:
You can use the nohup
command, so your command runs without the terminal and all the outputs from the program will go to the file nohup.out
(in the same directory you ran the command).
Use like so:
nohup python manage.py runserver 0.0.0.0:80
CodePudding user response:
You can use screen to run a program in background.
This should answer your question
CodePudding user response:
You may try:
python manage.py runserver 0.0.0.0:80 &
"&" puts the executed command in background and sets init as it's parent process when you close the terminal