'How to run Django project in background
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?
Solution 1:[1]
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
Solution 2:[2]
Solution 3:[3]
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
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | zeehyt |
| Solution 2 | PleSo |
| Solution 3 |
