Keep Python Server Running even after closing the terminal

Suppose you use following command to run your python server
python runserver
But once you close the terminal, process is killed and python server is stopped automatically.
This can be a bigger problem if server is placed remotely and you want to keep it running always whether your system is turned on or turned off.

Here is a solution for you. Use nohup with your command.
nohup your-command &

In this case, Run this command
nohup python runserver &
Now if you close the terminal, server still runs.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...