In this lesson, you will learn how to configure node apps using pm2 and a json config file.
Restarting your node.js app on code change using pm2
In this video, learn how to automatically restart your node.js app using pm2 when the code for your app changes. You will also learn how to exclude files and directories from restarting your app (such as static assets, css, images, etc.).
Passing environment variables to node.js using pm2
In this video, you will learn how to pass environment variables to your node.js app using the pm2 config file. This is useful for setting options inside your app such as production or development.
Using PM2 To Keep Your Node Apps Alive
Learn how to install, configure and use pm2, the popular node.js process manager to keep your node apps alive whenever things go wrong.
Controlling runaway apps using pm2
This video shows how to enable features in your pm2 config file that allow you to prevent runaway apps from bringing your server down. Setting max memory used, number of running processes allowed and maximum restart attempts are all covered.
Logging with PM2
This lesson shows you how to redirect pm2 logs to a specific folder, such as the Linux standard /var/log folder.