How to Deploy Your Nodejs App on Centos 7
PM2 is a process manager for nodejs apps. It daemonizes apps built with nodejs, which means run-as-service.
Let’s install PM2 using npm.
| |
Now you can start your app using pm2 like so:
| |
Next, register the app as a startup process.
You can check the currently running apps like so:
| |
Remember your app name or id so that you can use it to restart or stop the service.
| |
Simply entering pm2 command in your terminal will show you the pm2 help.
Happy coding! 🙂