Created
August 20, 2024 08:38
-
-
Save dharma017/6224c982681812bbfa9856722a5d7e93 to your computer and use it in GitHub Desktop.
NodeJS process manager
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List all running application | |
pm2 list | |
# Save application to be opened at reboot (only if you are adding new projects or path modified) | |
pm2 save | |
# Restart all saved application automatically | |
(When server restarted and no Node running process or when server down) | |
pm2 resurrect | |
# check process number with pm2 list and restart | |
pm2 restart 0 | |
# check logs | |
pm2 logs 0 --lines=10000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment