{"id":1397,"date":"2022-10-04T05:46:51","date_gmt":"2022-10-04T05:46:51","guid":{"rendered":"https:\/\/www.workfall.com\/learning\/blog\/?p=1397"},"modified":"2025-09-25T09:31:40","modified_gmt":"2025-09-25T09:31:40","slug":"pm2-daemon-process-manager-for-a-node-js-application","status":"publish","type":"post","link":"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/","title":{"rendered":"How to set up a PM2 daemon process manager for a Node.js application?"},"content":{"rendered":"<span class=\"rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\">9<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span>\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/5xIkMa9VGaS4JRPXydms_7igc0j2YK2286-KKyz4JQNFP_9dPVRsr3RIqROBxDZUdGmZRh1LtYl1GWT5D9RohrrucNExpoKrRpm3WYCZiN9yGDGxTEnekmUzxtVN1IYjforbaTo8TaShBZbZpiZhL-MWD7eG1fkJYvzqfPt_7bBRyas6jn4sI36eTw\" alt=\"PM2 daemon process manager for a Node.js application\"\/><\/figure>\n\n\n\n<p>Process management encompasses a wide range of activities centered on the creation, termination, and monitoring of processes. A process manager is a program that ensures that your applications remain operational after they have been launched.<\/p>\n\n\n\n<p class=\"has-text-align-justify\">Process managers can prevent production downtime by restarting your application automatically after a crash or even after the host machine reboots. They are also useful in development because they restart an app automatically when its source files or dependencies are updated. Monitoring tools that access application logs and other key metrics, such as CPU and memory usage, are also typically provided by process managers.<\/p>\n\n\n\n<p>In this blog, we will cover:<\/p>\n\n\n\n<ul><li>What is PM2?<\/li><li>Features of PM2<\/li><li>Required Installations for the process<\/li><li>Hands-on<\/li><li>Conclusion<\/li><\/ul>\n\n\n\n<h2>What is PM2?<\/h2>\n\n\n\n<p class=\"has-text-align-justify\">PM2 is a Node.js process manager with an integrated load balancer. It makes production deployments easier and allows you to keep running applications running indefinitely (even when accidents occur). It also provides insights into your application&#8217;s runtime performance and resource consumption, as well as the ability to scale your application in real-time via its clustering feature.<\/p>\n\n\n\n<p class=\"has-text-align-justify\">PM2 has additional features such as <a href=\"https:\/\/www.workfall.com\/learning\/blog\/how-to-install-and-run-docker-container-on-amazon-ec2-instance-part-1\/\">Docker<\/a> integration, a JavaScript API, and a daemon-less mode, so make sure to read <a href=\"https:\/\/pm2.keymetrics.io\/docs\/usage\/quick-start\/\">PM2\u2019s documentation<\/a> to learn more about these advanced features.<\/p>\n\n\n\n<h2>Features of PM2<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/O91mO7NoNW5wgcw0N76emlNUTC_WhvrB14AcDrg56IKEcpIDcWHCgFuzDTvWfN21UxbOa-dV0QKeeuKN8UIs1DRBd1RQDlQpnNCCRRyzOmJODibZpB31IAc0uN-U4yOA7LOpI9NNwSf0l3iqS4HTz-h1AQ2Kigm5Jp6UnabeP_QF2_nQwXfkH2mvkw\" alt=\"Features of PM2\"\/><\/figure>\n\n\n\n<h2>Required installations for the process<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/dX7v0UGgo_UpWYzODRkTYNUqka55H6S1I-pEmWyDtoBCsS7M9Hdf8cM1XUq-f1N-wDRM595hG41kdgrUq_cNp9O295D4wRxHourPmLIS5PeE5u7-8BgfBRsli7FioqsmyUJi42qPp0_rMyES7ENj6ra286O9eC_5khq9QnOmN_zFRm4MTrRaOVQ9Xw\" alt=\"PM2 daemon process manager for a Node.js application\"\/><\/figure>\n\n\n\n<ul><li><strong>Node.js: <\/strong>It is a JavaScript runtime environment that executes JavaScript code outside the browsers.<\/li><li><strong>PM2: <\/strong>It is a daemon process manager that helps in managing and keeping the application online.<\/li><\/ul>\n\n\n\n<h2>Hands-on<\/h2>\n\n\n\n<p class=\"has-text-align-justify\">In this hands-on, we will see how we can set up a PM2 daemon process manager and manage a Node.js application efficiently keeping it online. We will begin with creating a new directory on the local machine. Open the git bash editor, we will then install the PM2 package into the directory. Opening up the directory in a code editor, we will create a new js file in it. Then, we will add some code in the js file to start the server on the specific hostname and port number and print some content on the UI. We will then start a PM2 process using the shown command to start the server. On success, we will check the output of the application on the browser by hitting the URL on the defined hostname and port number. We will then make some changes in the UI content of the code and use a command to restart the PM2 process. Verifying the same, we will again make some changes in the code base and reload the PM2 instance. Following the same, we will then run commands to stop the application, list the PM2 processes with their statuses, print logs of an application executed on the PM2 process, start\/stop an application on system bootup, run the application in a cluster mode, scale up the application to run on multiple processes, monitor the instance, make use of PM2 UI dashboard, and finally delete all the processes of PM2.<\/p>\n\n\n\n<p>Create a new directory on your local machine.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/2v9GZJoQKqDOlISaE7h90fMlASNNBmG-G6aylXuTHBZsTJPnA77EEnudym5sLck1O4ZCtdeDpLye5FyVroEpyq1l8UMuMdSyMtogx9sEnb-5XapGdrFMP_kxbZooByIYyy8dswAcSlOawXAaUEsvMB6W9o6PZWwxKmhNUQqBlly7T5NgTndjJnbHjQ\" alt=\"\"\/><\/figure>\n\n\n\n<p>Right-click in the directory and click on git bash.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/aV7Oc-2RWuefCvuKha1uP5Dsa7tu8Jp1xbOAlCVBWYfnG6NCRiGU6bbDTs1igWvXW73fScJjaxhp6dh9LO_wbjwBXxZ5htSm2C5iG3H6qD5MiM3Pi_c6vK_XjVePDZlmb_lbW6O2up2W6wbb4DBfDZG23qmj41ZWacYj3-s9_mYJ4aw5fKr_32OXlg\" alt=\"How to set up a PM2 daemon process manager for a Node.js application?\"\/><\/figure>\n\n\n\n<p>Execute the command:<\/p>\n\n\n\n<p><code>npm install pm2<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/-gpuHnr9NyPWHqA3dQaD9G_h-3n3dt3uSfwezb3C2NSRn-L2tTz-YsrBhcENUd4afF4UoDvLeJRDiKOuqFYwZV4WPUsJ_Htd0ek83HgeCugMpo4R89KauZHXCvivK0oHPotIOi9glp-L1_ATkInDBw3TCMaKFZHuawd6vAgLgk78VrnBbak3yGgROQ\" alt=\"\"\/><\/figure>\n\n\n\n<p>On success, you will see the screen as shown in the image below.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/PRMpPRLdhPT7WHFHUZpT6DQ1gBOiVeRS1aSg5bYErHa1Bs-qGlYmzjBw4LmUhmiHmWGLXPgNGhLOgZPoqZbQdcVhAua7V0AaH-MzHAID8BEX_ff9PuAoEp1abHX_pSjIO3IMaD9EJssI7iqpweozHT1A2AUUAXhVO2zfV3-_hR3PJiIt_PNFGwlF_A\" alt=\"How to set up a PM2 daemon process manager for a Node.js application?\"\/><\/figure>\n\n\n\n<p>Open any of the code editors.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/WAIEIImry3Fok3dIHedMHEYUKH-OuUuektkcsH--Rac30jDN6Dgvwhmj0QHoG7kVP-bGfeDwTDWAOW1OKb8Kc-Gmy95fUPtYsP7dAXe9SVe6m9PPu0XwQkCAWKbLC2UBKaLg9jTWPFCZG93TI3GcfkBkown_NNXEfVUZcf5TQusGDbiRYHMifTV3uA\" alt=\"\"\/><\/figure>\n\n\n\n<p>Open the newly created directory in the code editor.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/c5wGPtEKpjWeJTap1ihco_WDHnYnC0d9VBt018R68Lma7ZE47s47SEbiBo0uUQjqq2KLollSNeRt7la5ymfZXqpr0aCH8Y5XaK7NXxedO2IJlctWvUMlh8vmg4trUrQ76IL-EyrOdTWGhAFfXdb6mS_PjB9afcgKTWPpOucZp2S6frplt3guk1p2Ig\" alt=\"\"\/><\/figure>\n\n\n\n<p>In the file structure pane, click on New File.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/AFSIhae_8-liYtJhM9TmhZhzUfQIPnDEOFBzsQDwy_mkh48Px-oNDjdb0jeuTYJia2MAo853hioSy5MhQIDcM24kYBKHyGUIbTx3Qx70L4AqmJogBK0w2izvAKZEuAW_UrCQK6GUf7BQyEedVO2YbW3rRHPkJa202Y_XfN7rO5UWviCQ4nV_E-2E1g\" alt=\"\"\/><\/figure>\n\n\n\n<p>Enter a name for the file and hit enter.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/BEPWP8TICf5a4ZhcGVMWP4roFErCylIlM2353lep99AF6Pp-V_F_QfBIIWWtFz7R6o3rslt0kwGG1hIvHga4m-a40u3XLZ-0MM5MtnnklT0F9NTn6FTN_jC1ZlNWUCT_OJAJ9geEFLXuxcJA-kZZOlt5ciKyYRFBeqgG_YkOgI1FkcAqA6WvL1uASQ\" alt=\"\"\/><\/figure>\n\n\n\n<p>Import the HTTP package using the below code.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/grsCFpMTElQt49knz11NoZSJ1HPpxmYZAgPuo-mIK9gg1OzvXCKk7UxKWuZ26YFB3asukIfgGZZCaLkUPYgYxHg2uhWI79VpsyuSe6Ru4p26BH0MDmWqJkpH0QfXZ9_HrBeogj4GLUY7J2uzUWWOUHlrSn7OsDrIY1QiSgzxro4_5upSWxGNTmjDzQ\" alt=\"\"\/><\/figure>\n\n\n\n<p>Define the hostname and the port number on which you wish to run the server.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/qkDjkzyHLzRx9oKTWAZjYQNKOcos4tVSGP-BJ5K2bKyULnkSbubVnhGy_k6yQeKtS5zgtWaYMqJ0pd2WRPIiB-Feoi4_JjDhI35XYQ_F1SC8TRn_EfUB7iUHwXp3Kp1IP_A8JGcYxmgtSROHnJ6LNGIQpyJQVd0JYsvQd5V5UslDCC_sPXnRzqj-wg\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">Create a new variable thereby creating a server to print the output on the screen and add a status code for the same declaring the content type.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/8KGWKjDl_bpL8-BQcScgH538D31jaNodXkLCiULDWawd9IsOq8zwLWsutjqacTT02hoKtyIW-aKeA1BNYBzrJkpy1rcFudKm2yl5pAe9REj3fGyq2C-Nj-PV1XVyJ8qp-8-eWEp6UrNcswS4DXs3s3NsXzOaD5tLu_1-dQA0GUSQ-PVbZnAPhiGyHA\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">Using the below code, the server will listen to the defined port and host and execute our application on the same URL.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/TQ3E_asauAYaE9eS1VdblGRaBs4MvZj_ul0hK-tpnyfZ_is5qlR2aSi3-FDdKbJhZkvb9Uaq1QSmdw9_njJ7RW9GK_UQaj91-0oNymY13dGU-eqD2dPYWJ_2jRHxdCLIMqTUWbjkLdtEA84lzGOYr7YzzQNkR-QybZ4hJb4t-AhCkcnEfNJQu0G_GA\" alt=\"\"\/><\/figure>\n\n\n\n<p>By combining the entire code base, you will have the entire code as shown in the image below.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/pCUfNI0I6rWzCvM8Z23WXsXUtWzBQ23j9qp21QEjIk0IXcLfQebvl4FQrsEIgy60cvsaQYkDi00r4SCmqQSdVVfxCxsoRqFcwBkoMBFyGFMTcU89SNzyvb8R7UbhDrReixTYH_00wzNrRMN9h2nuFfis4dYm_CbsQN8MeTziEcRMA1irQ76Jc_8Iww\" alt=\"How to set up a PM2 daemon process manager for a Node.js application?\"\/><\/figure>\n\n\n\n<p>Now, to start the PM2 server, use the command:<\/p>\n\n\n\n<p><code>pm2 start app.js<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/saJobcQ-xH_4rlwBiY5xEWjoW8JNcdOaFBvKYSDuQ6FCDAOJ8j54WFHwPGgPbyOoZpitgLbOFfqUvhtWLamOBiGbkfx6ppMyN0UPBYaElH2hJWsMGBuWOjPTvlaG6BXpjANKYY0023hRdZWVq1kVCPQhLNTaNjAP1hx0CQ4eZMcvtoi0Pa7heNmacQ\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">On successful execution of the above command, you will notice the process will be started on a port thereby displaying the status, CPU utilization, memory occupied, etc.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/7ucqexGdBJcgyfsDuSwMK_CQbdF_b8BKTSv-qkMDN5yW0UKd9w96e_YeYqQic0UPbOioHnCEZgPtl-pJoHhyeGZsFuBpupDO4JUzKC6g6HNvrNbNX-vAp9qPlDJLyt-q3ncCUksf0g5XZICMlcUgzwyhdYvBukSOxvcqsupOjMxADXsPwX9vx-q7aw\" alt=\"How to set up a PM2 daemon process manager for a Node.js application?\"\/><\/figure>\n\n\n\n<p>Open any of the browsers, use the URL as localhost:80, and hit enter.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/FDlgkG1GJmXeytyYzSi1lPeswI6h7zZSqfRdusLN5vhY6Z-XFPS2agMM4MvSwBGFocB3faeJtZszu0-z0UCINoJTJrJQfOMDUh-iN3L9haIy1cIL2jIGuL2z3jHW6KKDUCN9D-T6jMmEjkQwZIftPzdIsUSpGt_vqGZU4NO_-9NeHCNLE5svRvmkxg\" alt=\"\"\/><\/figure>\n\n\n\n<p>On success, you will see the output on the screen on correct execution.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/lE7e22SGM-Q97FuYwb0CEwFXNwWi0XG8ijCXDd4yHeMlL7q0iY5dkXSFmXhbcg9ER0gPL4OLIEfhXOu_0IU5LBdVfwjj7ea7fNOl5st5-dYQg5d3gfptOkCISsUFISi2231mQcgmRN-wyawAJQ1n6Mn0B4pyiTcugyo5fgmheumIpw044bqKPtLU9g\" alt=\"\"\/><\/figure>\n\n\n\n<p>Now, change the content that is to be printed on the UI.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/1PO8k-c5vwpIEVKONbfvVw998wbrYpr0QRLOVKghTYTAouVJ4FVLkUytOAsgxB63wxLLRilJbuLTM6s4rH8h8kBB2tPrCCfyt5Slp21r1t9ssrUNxjs9xJYwcmsMwm53m8EZrh-vgZT9D5b2GFgMuyWcntVkUSDRapmatvvjgqYBbQO65wuqfM_L5w\" alt=\"How to set up a PM2 daemon process manager for a Node.js application?\"\/><\/figure>\n\n\n\n<p>To display the latest content on the UI, run the command:<\/p>\n\n\n\n<p><code>pm2 restart app.js<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/cNLImgfgt5TmB8SdJ49l87wo2Hj1DBbnJq1M8k9Qp0wtscODoS031-zVZQ9kLlAe2IAkGPpi4vCqmtAZt93n4b04IljnKSXJv-Lezhrtu4Z0Sk_gbq6Pc-50rJu5qSPW5olBfKPXxHGsbqj4GgBEkt9QWXs0d1FLHfcAYIsS0uflIrXPWx3D6A_fng\" alt=\"\"\/><\/figure>\n\n\n\n<p>On success, you will see the server running as shown in the image below.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/3_ggmF-jH2IsTnLP5ztz7-7D9_hIOS4tduxw97w9UYvHmUmSphlFcZfqf-vsFDfGm0oc17IXfa7UaY4gaV_vwYNvkGnBgZzpXs4xbLDupgk_GruDDIhsQjH4UBAhoCBUYEFz8B67_EsNOTp2CikxAbFBUTR6I5tAZgA-fINBjKYSDxQvz_jBL-R9bw\" alt=\"\"\/><\/figure>\n\n\n\n<p>Once you refresh the page, you&#8217;ll see the new content on the UI.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/2gdIx0SNQar12lWqawCTSpQH949sQw49uE_HpLwP2y04JiYpOocrf2G3vYgEwIVwZg5elslGpRIY3JCQo2wykVkZx1VclCpozNA-Fyb14jPQGXshgb9ECjzbPEV8sfzKJVDwRs20VPSt0xUFFJRBOl9598LEZ4_WWvy1d49qQFnTLNJ3mL1EouGztw\" alt=\"\"\/><\/figure>\n\n\n\n<p>Now, navigate to the code file and update the code again with the new content.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/XIFh3M-qCtYWq3EsBUKl3b-fgjxd6d-Sbl6kEP78Yz56jllKtEXYMyK2i0dZFvp90Kci0ZtcJD4cpFRa49HMbBI6l9MlIvm7ORj_KuJ0VcZRmr91ISyf04UL1Z_roaDIPmUX4pV-tq5A_NlIZrderpslBxdMKEjDnrqJMDGOce0MaWtagiz6g7J6zA\" alt=\"How to set up a PM2 daemon process manager for a Node.js application?\"\/><\/figure>\n\n\n\n<p>To reload the page, run the command:<\/p>\n\n\n\n<p><code>pm2 reload app.js<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/dmvNEk_sl2fU5wWZtsRV-MiZiNDZ9U01Y1642o8xHbD1qZm2CIGXd9xTgxFQwMbBVsEGYhm6UIq9dYwOQbPqjN4jkZ4qg5G-I277IB1AetkHjHYjk0LDlRBak6Ivo5gfscLqcgFATxJd1e8GJUdh00TJKh3esKUoj9OXKJQyrhFwN-UNgdA7_cao7g\" alt=\"\"\/><\/figure>\n\n\n\n<p>Now, you need not refresh the page and you&#8217;ll see the new content updated on the UI.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/5A6NLI1a6Pui9F2K93c89QIlKgamC6TYTB1QsUoHG0kBM4RIHKiHLZMpUmfZxg18yIgMGb8_HEuvLcVFadIlzJnin8CAjkEizD9DUZvkFZ3eNXJV3pRLsHjGBgzBqLY2ZCSDgCqqAjS-VJDT72S4voQXcMSI1HicNNxlUx6S-DJ1IaRYHSsak8-nwg\" alt=\"\"\/><\/figure>\n\n\n\n<p>To stop the server, execute the command:<\/p>\n\n\n\n<p><code>pm2 stop app.js<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/sK6IpA-qQm_p_JWe6k0oPDdbFdKP7IbToSiZSNVE8ReRbZhECjXCOYChkKof9L_NlUIop6xFNsPrQOcHJz02RnFrLzJIru_zIFTAE2BMxPmYbWmfoUGjTZz3SdEf3fZZGYIPYnD0-VtyVUfsEe_ScBTAIKgHlsImd9NefXG-zA6ea1ISLegWflRmCA\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">On success, you will see that the server will stop. The status will change from online to stopped and the CPU utilization and memory will change to 0 since the server has been stopped.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/sVghiHxcpWOYOLbEH2pZvQoqPFtOu_58DNzdaVu2D8TiFsKIqN-pAzr4W9wd8DUjMJ-C4uoqkgxZGZdYDN9Mg8vY5zd4y3RLdQ_r6sZvEjWgOZ4z6CewpXYJ_c17qRdwo1-mOp4HnodvKNMg_UFitvjOI1Nx2dzCGS2NCk5rjs4eoDNcLidYvW5DVQ\" alt=\"How to set up a PM2 daemon process manager for a Node.js application?\"\/><\/figure>\n\n\n\n<p>To check the list of PM2 servers being online or offline, run the command:<\/p>\n\n\n\n<p><code>pm2 list<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/NyTyCTwCHzo1CmcwiuNXXb_LCwZuz_B-mMmkOBEYe1sUkkHV2uGXEAH3cUBSmrI7Zob2pSEwtXmZsyvBPyC5NZzP2zYhvEla9XZeGsBfYEvqGd_eRiPYgRcJJ7-nSyfI45mHDRdzhA2Ulk0zgRxTEQJb6LY2pgFndUz58hg2aOU-yOsY0pLb97WLbA\" alt=\"\"\/><\/figure>\n\n\n\n<p>On executing the above command, you will see the list of applications with their corresponding statuses.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/o_TmFOyLKguy5Nslei0kurlARojYh_WffP8zc_EsLicJyK09xYLBh4Y4ZFgL4w5t68yxSZNnOvXJsXtDWoosuQS1UAKSpn2IPmqCN31oQry8vNovl5inf2X0o24-llhcWI6p9NF5-WjtsgX65SZIOkwVgFMBOrxld4xCCGwTqpJz6CD8FQU58-f2wQ\" alt=\"\"\/><\/figure>\n\n\n\n<p>To view the logs for the application, execute the command:<\/p>\n\n\n\n<p><code>pm2 logs<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/Z1FxfwSnvUmVjKGznW40AYzSmZoeFJJR1as11qfSDiIihmDkHLIDN93wD9lub7hQjoXyAaFUrD-cKDjf5Nf1gVroExEactXD6RZjvGaFzjrkKzdXlVFy4gBLA35__tVuf9xZjAEz4X3XPIlWiZk89ILBN9dRga0NCe8UdGGwNNylyJEc-kCY4czu0A\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">On success, you will see all the logs for the application you executed with its process id and starting and stopping the application, and many more details.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/20mg4tLakqJtr9lJlwQPM2UY6zI-scEz-f9AkW6v_XKMxAWYyOXMgQl5LttatQs7DgLislkdQZn645twtQ2B5LMMe9BKc7muM5eh57hjQmUrYkSpSMAK4uge7USscfnlbOndiJuZUHy8E3KblEaq9E8vpN29zGMunWGVid4PkorZliEn0M0I-zrdsQ\" alt=\"How to set up a PM2 daemon process manager for a Node.js application?\"\/><\/figure>\n\n\n\n<p>To keep monitoring a running application, run the command:<\/p>\n\n\n\n<p><code>pm2 monit<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/uAENuj8hQXhYjX8HQ1Nf6HlQ7yGJ9SJw0GSNJl6xpBqfIrm2LD6F7ZdWX9vQf8pDLYKIy4X_rTJauqTS38HN7Ac1EiovMlh5z_QaA2eG8NyLC9CXFsoZhL-sY157XdOk-yWZZuxTmzQQzLOpdX1DBQxYeVDB6vQ_U90AUFtJLEOoVXlN4I5YHwOkPQ\" alt=\"\"\/><\/figure>\n\n\n\n<p>On success, you will get to see a dashboard where you can monitor the running applications.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/cQSpNWgnzRH0wWmo7v8vDdGoPaulfgQjenJyu11AYq8FF2XYn9QhU6XO1LAYdWDiEVjzC-N5Usr56f3svpj4VNKgIUMm1nyNcw_8zNGj0NxnqONiyCCXvk5W-UrckwtfFKzqYuk2b4GSdQqDVfqEe4wT7K_VGTv8gnO9uK8x0I_AEElA_5kxyMqkdw\" alt=\"How to set up a PM2 daemon process manager for a Node.js application?\"\/><\/figure>\n\n\n\n<p>To use the command services of the PM2 server on a separate dashboard, run the command:<\/p>\n\n\n\n<p><code>pm2 plus<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/8ExzVd17Op9Q3VX1eYdKUxI1SmjNqGSuoM8YX9pqIgAOAEK-v60xl_TROc7XnFQyu8XuJtaviCWhUr5aBy_RF75THai04dLoNqb-gDLStk6Wu4JxCR8Xk7ZcYjZGRC1QoWFYGly820GkD-3ZLw7ygvUcJ9Hxrgj69cnqGsejhmSvA1PIhVmlRmIg6Q\" alt=\"\"\/><\/figure>\n\n\n\n<p>On success, you will see a URL on the console.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/q2g3mISe0TlCD2k1dFFa7zifgfyijisBZvpKPCVl35xa0JzdvzOAgLlFNi0BNrjuq4quwA3d1gPCZ2vkrMaRQbVXZXqB_gzJrLFGg9F6mUICybYvl7JqMl2AXyzHJZX7sveD9yhJ4pPYHOMhcQjBH4dCGIdHRKIX6etPh96i-QGKIS7X53FcKmYcfA\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">You will also be navigated to a dashboard in your browser using the same URL as shown in the image below. You can hereby perform 3rd logins and use the same command services via a dashboard.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/qaqHHiZHtnTc6kDkzVzxadEelULXIYaGQPJjDsPPo_35RAQBmwPN5UXwbgNg8Lp3bJovmE9MBXOTSpS_WO5zsrFoed6P-CYV_trR4PJebNr5id5tKxB6UWZtjM7KoI1Qkl12Tqpkev0TrOk7PnrXNo3_Ii26PP5PEZfhnv0AAOiMGSZCNaF-xffEeQ\" alt=\"How to set up a PM2 daemon process manager for a Node.js application?\"\/><\/figure>\n\n\n\n<p>To run the application as soon as you turn on your system, run the command:<\/p>\n\n\n\n<p><code>pm2 startup<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/6H97K0X7lnWtUK2LhbBn7lygKa4jnhGHWizyMPZGZAM4O5Gs6VMdPOt9qtkHAnGNibpkwH8KaMwP7p0_tGt2UWTuTnjTKrufqHE4Pg_n3ewWvNnDb0ph6qa26awQcM9gF_pgXi6Nxjw1bvLNGoe1CeumJ7KBvvYSYTFaS2ZEwm6TDRjxq_QJ3xNDOw\" alt=\"\"\/><\/figure>\n\n\n\n<p>The stop the running of the application on system startup, run the command:<\/p>\n\n\n\n<p><code>pm2 unstartup systemd<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/ljuLfgVpQobzpkx3JkC3y2ZaEC-DgFbAvSGIHPplb88DQLqK1RG8mIyM8hVDCvMZtvizLnG41IeWTRKNQ5bHNitrG6lkZ-CiLye0PT_H91WE92OyisJKjgE8kiaoEakvfm6ed7ZCKwVDlTsEoMV-pmz0J6Y1nSM_MN3uRt8uJPkumzOCb24pxQ2lJw\" alt=\"\"\/><\/figure>\n\n\n\n<p>To run the application into a cluster mode, execute the command:<\/p>\n\n\n\n<p><code>pm2 start app.js -i 3&nbsp;<\/code><\/p>\n\n\n\n<p>(3 &#8211; is the number of clusters you wish to have for your application)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/EnuGwgPmZrR-nXXCF_7u9tVHb4aPGCys5oQBBhMCEjNuG3Xr0LnkdBOm7YcBXgp07orYxJhXT5HNnWvT4VKJgCsQQpj-STb_WKaWgvO08qW62aD7s0f0ExW94A8AI_vonasu6Q4fk9Li88hq2yDYmnQ4GQTs-JpuFlT8TPmGqsueuQrKYjfqhI8HoA\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">On success, you will see the application will be started but the CPU utilization and memory usage will increase since we are now running the application on 3 clusters and the status of the application will change to online.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/M3UvGnZLL5Fi2uTCM86Q7qLT-iJJRPdja7N7iBdNiSpqfceUjOQiJsPtE9BzKyRr32JYmzidx3cgVbD66GJomAz4abxAYiScuevZvDXgDMCmIPcMd6t8eu8Uvq5Ow4SPNttebfxh3bSOykCbeqC9Wy9BlPxb5RvwCrNFeQ98b-P5UWrKSlLfRpA-ZA\" alt=\"How to set up a PM2 daemon process manager for a Node.js application?\"\/><\/figure>\n\n\n\n<p>To scale up the application, execute the command:<\/p>\n\n\n\n<p><code>pm2 scale app 4<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/nEgd3HoP4c36_fhrsmS6PaZRKJijWy7EzYWTPP3VQsLirCAOx7PU9LfGAoLW0dcWLVYU1psJz9WzguUIY1kT4hxvFCqLzNzBzpnjJ-4ZLZMghBAwvlniT-gvIBELnMhkHNfFBzwipj-5tviel3b3vPPAuRO_FS8DRGel_5R-NcnK5YLoEeJfsSd-yg\" alt=\"\"\/><\/figure>\n\n\n\n<p>On success, you will see the application execution scaled up to 4 processes.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/7OIh2KZdmhryFoaTvNhiicB1bGubzLup--Hf-UgQsUDBwFZxcanWNsG0oRg_bXZMsgYESF-LKhKdbD_bgrsbcSgss3I-SyFE_zf3MkU9gALxkjPfO8eQKIhdRy96NXAfJd0l-p0KvNNpHpn6aGYyezmkEbgp1Ch9qbLabm5bwV9pf6dYF11vzQXDAw\" alt=\"\"\/><\/figure>\n\n\n\n<p>To stop the execution of the application, execute the command:<\/p>\n\n\n\n<p><code>pm2 stop app<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/lJ-ecDcTVxK_lG2i1nNu8QLJgaOPf-cDA1OshvI4EVF2u8QEudJHX_QZWsyUbegTz1vTIsOKlTQuc2nmGeXLeda1PFFsQlLBdFyv6vygKJxIv4xkHbhIiKCUNd8Q2pDEIfnxnPDvcp_sGnD6z3bLCIhrFfwLSsJZOkpX8noFud2m2S1ZkxKxlqQtXQ\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">On success, you will see that the execution of the application will have the status changed to stopped with nullified CPU utilization and memory usage.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/ZSWPW7aEfFbL7H8-YxkJScvnWYCyypHOUbS-3rRKMcgff5kULTP3AXFgESFR97RcZq5vjVuChooUEm11cdWRBOv0tUUQyQsOFi8wbBV18cxYuSyhyUStrm0yyoSJw0M_nXNeOe19RXeiI8PcckSvdnb7X0nobu96_4Fzub-E-Y3VVhzgN5VZF3hH8w\" alt=\"How to set up a PM2 daemon process manager for a Node.js application?\"\/><\/figure>\n\n\n\n<p>To delete the processes and the instances of the application from the PM2 server, run the command:<\/p>\n\n\n\n<p><code>pm2 delete app<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/MdjayirL5_VAsAUGq09EDdVIG5gdSmlGv-vmWB6NlUNWGtyT7N8Pkxohin76YyWYu7HUUTUbGeHbv_tVQ5Lsju4Kat8O4rR2lHMG4HjCEbTveaaLAtyZ1bN35SpJ9DRSkBs6-ripUPfLAAj38xJA1W2OpMPFZ1PutUleJ8vlhijHCNczjOfy75EJFw\" alt=\"\"\/><\/figure>\n\n\n\n<p>On success, you will see the list will become empty.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/U6w58XVOIr_qBgv6jaA9QielHpLgBV81p8kzcNc6QjQF0fxJFN2CQuvTHNVWVgz-nBQzzDcGunNtuh7Kz2ULbXB66dnoHt63ECfvUj81gAuX56GiRTT6RCJaAejBhyqfMuXTdLts0zIK9pf6lp5_-_TIigY9Fqcb2EFUl9TfloGxmo8uxyvK4zGFJg\" alt=\"\"\/><\/figure>\n\n\n\n<p>Now, you can cross-verify the same running the command:<\/p>\n\n\n\n<p><code>pm2 list<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/5ytSpdYly_ApcbRfC2b7nGxAd0_3lJu52BDvLjTXbPVD5SB6TvPpQC8P0EH0tlePRctaBectbCPP56M3LNi9zZaPtt0WMjw1DDqxN7Nwm4rSFvLcTlbuBd19toEp4myDBKEgSvGPL3RUZWzmOIt3p3CDEIbdUIaJpqkrugUl2djlQ0xrTgl_bUFq2w\" alt=\"\"\/><\/figure>\n\n\n\n<p>You will get the same result since you have deleted all the instances of the execution of the application.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/ylaPm4OmLrftW_dJJ8UXU_TGi4lOkBuufmk74AlupSmnTiJTFGZTsX015dChr5gvUCnAVlORFQ8udnXU4QQWeEkcB8Zt5Ukf1EwSXNM5FOpvAfsy1TOF8tTmuOwmUbF57hzvFrmKUr-liKPKj6H7VNMmtJQ2eyI1klc74_FZlz2aHyl_qxxepvTYPw\" alt=\"\"\/><\/figure>\n\n\n\n<h2>Conclusion<\/h2>\n\n\n\n<p class=\"has-text-align-justify\">In this hands-on, we saw how we can set up a PM2 daemon process manager and manage a Node.js application efficiently keeping it online. We began with creating a new directory on the local machine. Opening up the git bash editor, we then installed the PM2 package into the directory. Opening up the directory in a code editor, we created a new js file in it. Then, we added some code in the js file to start the server on the specific hostname and port number and print some content on the UI. We then started a PM2 process using a command to start the server. On success, we checked the output of the application on the browser hitting the URL on the defined hostname and port number. We then made some changes in the UI content of the code and used a command to restart the PM2 process. Verifying the same, we again made some changes in the code base and reloaded the PM2 instance. Following the same, we then executed commands to stop the application, list the PM2 processes with their statuses, printed logs of an application executed on a PM2 process, start\/stop an application on system bootup, run the application in a cluster mode, scale up the application to run on multiple processes, monitor the instance, make use of PM2 UI dashboard, and finally delete all the processes of PM2. We will come up with more such use cases in our upcoming blogs.<\/p>\n\n\n\n<p><strong>Meanwhile\u2026<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-justify\">If you are an aspiring Node Developer and want to explore more about the above topics, here are a few of our blogs for your reference:<\/p>\n\n\n\n<ul><li><a href=\"https:\/\/www.workfall.com\/learning\/blog\/how-to-upload-single-or-multiple-images-to-a-local-directory-with-multer-in-node-js\/\">How to upload single or multiple images to a local directory with Multer in Node.js?<\/a><\/li><li><a href=\"https:\/\/www.workfall.com\/learning\/blog\/how-to-show-flash-messages-in-node-js-using-the-connect-flash-package\/\">How to Show Flash Messages in Node.js using the Connect-flash Package?<\/a><\/li><li><a href=\"https:\/\/www.workfall.com\/learning\/blog\/how-to-send-customized-emails-by-integrating-sendgrid-with-a-node-js-application\/\">How to send customized emails by integrating SendGrid with a Node.js application?<\/a><\/li><li><a href=\"https:\/\/www.workfall.com\/learning\/blog\/how-to-export-data-to-a-csv-file-using-multiple-npm-packages-in-node-js\/\">How to export data to a CSV file using multiple npm packages in Node.js?<\/a><\/li><li><a href=\"https:\/\/www.workfall.com\/learning\/blog\/how-to-connect-to-mysql-database-and-run-crud-operations-in-node-js\/\">How to connect to MySQL database and run CRUD operations in Node.js?<\/a><\/li><\/ul>\n\n\n\n<p>Stay tuned to get all the updates about our upcoming blogs on the cloud and the latest technologies.<\/p>\n\n\n\n<p><strong>Keep Exploring -&gt; Keep Learning -&gt; Keep Mastering&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-justify\">At <a href=\"https:\/\/www.workfall.com\/\">Workfall<\/a>, we strive to provide the best tech and pay opportunities to kickass coders around the world. If you\u2019re looking to work with global clients, build cutting-edge products and make big bucks doing so, give it a shot at <a href=\"https:\/\/www.workfall.com\/partner\/\">workfall.com\/partner<\/a> today!<\/p>\n\n\n\n<p><\/p>\n\n\n<style type=\"text\/css\"><\/style><section id='' \n                class='helpie-faq accordions faq-toggle open-first groupSettings-522__enabled' \n                data-collection='' \n                data-pagination='0' \n                data-search='0' \n                data-pagination-enabled='0'\n                role='region'\n                aria-label='FAQ Section'\n                aria-live='polite'><h3 class=\"collection-title\">Frequently Asked Questions:<\/h3><article class=\"accordion \"><div class='helpie-faq-row'><div class='helpie-faq-col helpie-faq-col-12' ><ul><li class=\"accordion__item \"><div class=\"accordion__header \" \r\n                id=\"accordion-header-post-2977\"\r\n                role=\"button\"\r\n                aria-expanded=\"false\"\r\n                aria-controls=\"accordion-content-post-2977\"\r\n                data-id=\"post-2977\" \r\n                data-item=\"hfaq-post-2977\" \r\n                style=\"background:transparent;\" \r\n                data-tags=\"\"\r\n                tabindex=\"0\"><div class=\"accordion__title\">Q. What is PM2 and why use it with Node.js?<\/div><\/div><div id=\"accordion-content-post-2977\" \r\n                class=\"accordion__body\" \r\n                role=\"region\"\r\n                aria-labelledby=\"accordion-header-post-2977\"\r\n                style=\"background:transparent;\"><p><span class=\"rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\">9<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span><b>A: <\/b><span style=\"font-weight: 400\">PM2 is a production process manager for Node.js that runs your apps as daemons, ensures they stay running (restarts on crash), provides clustering, monitoring, log management, and can launch apps on system startup.<\/span> <span style=\"font-weight: 400\">It helps avoid downtime and simplifies process control.<\/span><\/p>\n<\/div><\/li><li class=\"accordion__item \"><div class=\"accordion__header \" \r\n                id=\"accordion-header-post-2978\"\r\n                role=\"button\"\r\n                aria-expanded=\"false\"\r\n                aria-controls=\"accordion-content-post-2978\"\r\n                data-id=\"post-2978\" \r\n                data-item=\"hfaq-post-2978\" \r\n                style=\"background:transparent;\" \r\n                data-tags=\"\"\r\n                tabindex=\"0\"><div class=\"accordion__title\">Q. How do I install and start using PM2 for my Node.js project?<\/div><\/div><div id=\"accordion-content-post-2978\" \r\n                class=\"accordion__body\" \r\n                role=\"region\"\r\n                aria-labelledby=\"accordion-header-post-2978\"\r\n                style=\"background:transparent;\"><p><span class=\"rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\">9<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span><b>A: <\/b><span style=\"font-weight: 400\">Install via <\/span><span style=\"font-weight: 400\">npm install pm2 &#8211;save<\/span><span style=\"font-weight: 400\"> (or globally via <\/span><span style=\"font-weight: 400\">npm install -g pm2<\/span><span style=\"font-weight: 400\">). In your project folder, run <\/span><span style=\"font-weight: 400\">pm2 start app.js<\/span><span style=\"font-weight: 400\"> (or <\/span><span style=\"font-weight: 400\">pm2 start index.js<\/span><span style=\"font-weight: 400\">) to launch the process. You can name the process using <\/span><span style=\"font-weight: 400\">&#8211;name<\/span><span style=\"font-weight: 400\">.<\/span><a href=\"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/?utm_source=chatgpt.com\"><span style=\"font-weight: 400\">\u00a0<\/span><\/a><\/p>\n<\/div><\/li><li class=\"accordion__item \"><div class=\"accordion__header \" \r\n                id=\"accordion-header-post-2979\"\r\n                role=\"button\"\r\n                aria-expanded=\"false\"\r\n                aria-controls=\"accordion-content-post-2979\"\r\n                data-id=\"post-2979\" \r\n                data-item=\"hfaq-post-2979\" \r\n                style=\"background:transparent;\" \r\n                data-tags=\"\"\r\n                tabindex=\"0\"><div class=\"accordion__title\">Q. How can I manage and monitor my application using PM2 commands?<\/div><\/div><div id=\"accordion-content-post-2979\" \r\n                class=\"accordion__body\" \r\n                role=\"region\"\r\n                aria-labelledby=\"accordion-header-post-2979\"\r\n                style=\"background:transparent;\"><p><span class=\"rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\">9<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span><b>Answer:<\/b><b><br \/>\n<\/b><span style=\"font-weight: 400\"> Basic commands:<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400\">pm2 list<\/span><span style=\"font-weight: 400\">: list running processes<\/span><span style=\"font-weight: 400\">\n<p><\/span><\/li>\n<li><span style=\"font-weight: 400\">pm2 stop &lt;app&gt;<\/span><span style=\"font-weight: 400\"> or <\/span><span style=\"font-weight: 400\">pm2 delete &lt;app&gt;<\/span><span style=\"font-weight: 400\">: stop or remove<\/span><span style=\"font-weight: 400\">\n<p><\/span><\/li>\n<li><span style=\"font-weight: 400\">pm2 restart &lt;app&gt;<\/span><span style=\"font-weight: 400\"> or <\/span><span style=\"font-weight: 400\">pm2 reload &lt;app&gt;<\/span><span style=\"font-weight: 400\">: restart or reload without downtime<\/span><span style=\"font-weight: 400\">\n<p><\/span><\/li>\n<li><span style=\"font-weight: 400\">pm2 logs &lt;app&gt;<\/span><span style=\"font-weight: 400\">: view aggregated logs<\/span><span style=\"font-weight: 400\">\n<p><\/span><\/li>\n<li><span style=\"font-weight: 400\">pm2 monit<\/span><span style=\"font-weight: 400\">: open monitoring dashboard<\/span><span style=\"font-weight: 400\">\n<p><\/span><\/li>\n<li><span style=\"font-weight: 400\">pm2 startup<\/span><span style=\"font-weight: 400\">: generate startup scripts so processes start on system boot<\/span><span style=\"font-weight: 400\">\n<p><\/span><\/li>\n<li><span style=\"font-weight: 400\">pm2 scale &lt;app&gt; &lt;n&gt;<\/span><span style=\"font-weight: 400\">: run <\/span><span style=\"font-weight: 400\">n<\/span><span style=\"font-weight: 400\"> instances (cluster mode)<\/span><a href=\"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/?utm_source=chatgpt.com\"><span style=\"font-weight: 400\">\u00a0<\/span><\/a><\/li>\n<\/ul>\n<\/div><\/li><li class=\"accordion__item \"><div class=\"accordion__header \" \r\n                id=\"accordion-header-post-2980\"\r\n                role=\"button\"\r\n                aria-expanded=\"false\"\r\n                aria-controls=\"accordion-content-post-2980\"\r\n                data-id=\"post-2980\" \r\n                data-item=\"hfaq-post-2980\" \r\n                style=\"background:transparent;\" \r\n                data-tags=\"\"\r\n                tabindex=\"0\"><div class=\"accordion__title\">Q. What is clustering mode and when should I use it?<\/div><\/div><div id=\"accordion-content-post-2980\" \r\n                class=\"accordion__body\" \r\n                role=\"region\"\r\n                aria-labelledby=\"accordion-header-post-2980\"\r\n                style=\"background:transparent;\"><p><span class=\"rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\">9<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span><b>A: <\/b><span style=\"font-weight: 400\">In cluster mode, PM2 spawns multiple instances of your Node.js app (workers) that share server ports using Node\u2019s cluster module. This allows better utilization of multi-core machines and improved throughput. Use clustering when your application is CPU-bound or when handling many concurrent requests.<\/span><\/p>\n<\/div><\/li><li class=\"accordion__item \"><div class=\"accordion__header \" \r\n                id=\"accordion-header-post-2981\"\r\n                role=\"button\"\r\n                aria-expanded=\"false\"\r\n                aria-controls=\"accordion-content-post-2981\"\r\n                data-id=\"post-2981\" \r\n                data-item=\"hfaq-post-2981\" \r\n                style=\"background:transparent;\" \r\n                data-tags=\"\"\r\n                tabindex=\"0\"><div class=\"accordion__title\">Q. What are best practices and caveats when using PM2 in production?<\/div><\/div><div id=\"accordion-content-post-2981\" \r\n                class=\"accordion__body\" \r\n                role=\"region\"\r\n                aria-labelledby=\"accordion-header-post-2981\"\r\n                style=\"background:transparent;\"><p><span class=\"rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\">9<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span><b>Answer:<\/b><\/p>\n<ul>\n<li><span style=\"font-weight: 400\">Use <\/span><span style=\"font-weight: 400\">pm2 save<\/span><span style=\"font-weight: 400\"> after starting processes and use <\/span><span style=\"font-weight: 400\">pm2 startup<\/span><span style=\"font-weight: 400\"> for auto-restart on reboot.<\/span><a href=\"https:\/\/blog.appsignal.com\/2022\/03\/09\/a-complete-guide-to-nodejs-process-management-with-pm2.html?utm_source=chatgpt.com\"><span style=\"font-weight: 400\">\u00a0<\/span><\/a><\/li>\n<li><span style=\"font-weight: 400\">Watch memory leaks \u2014 restart processes before limits reached.<\/span><span style=\"font-weight: 400\">\n<p><\/span><\/li>\n<li><span style=\"font-weight: 400\">Use <\/span><span style=\"font-weight: 400\">pm2-runtime<\/span><span style=\"font-weight: 400\"> instead of plain <\/span><span style=\"font-weight: 400\">pm2<\/span><span style=\"font-weight: 400\"> in Docker containers to keep process in the foreground.<\/span><span style=\"font-weight: 400\">\n<p><\/span><\/li>\n<li><span style=\"font-weight: 400\">Avoid excessive customization \u2014 let PM2 handle environment variables and ecosystem files.<\/span><span style=\"font-weight: 400\">\n<p><\/span><\/li>\n<li><span style=\"font-weight: 400\">Be cautious with environment differences \u2014 PM2 may alter runtime behavior, so test thoroughly.<\/span><span style=\"font-weight: 400\">\n<p><\/span><\/li>\n<li><span style=\"font-weight: 400\">Monitor logs, health metrics, and handle unhandled exceptions within your app so PM2 doesn\u2019t constantly crash-restart.<\/span><\/li>\n<\/ul>\n<\/div><\/li><\/ul><\/div><\/div><\/article><\/section>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\">9<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span> Process management encompasses a wide range of activities centered on the creation, termination, and monitoring of processes. A process manager is a program that ensures that your applications remain operational after they have been launched. Process managers can prevent production downtime by restarting your application automatically after a crash or even after the host machine [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1398,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[288],"tags":[265,250,338,341,339,6],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to set up a PM2 daemon process manager for a Node.js application? - The Workfall Blog<\/title>\n<meta name=\"description\" content=\"PM2 is a Node.js process manager with an integrated load balancer. It makes production deployments easier and allows us to keep running apps.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to set up a PM2 daemon process manager for a Node.js application? - The Workfall Blog\" \/>\n<meta property=\"og:description\" content=\"PM2 is a Node.js process manager with an integrated load balancer. It makes production deployments easier and allows us to keep running apps.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/\" \/>\n<meta property=\"og:site_name\" content=\"The Workfall Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/workfall\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-04T05:46:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-25T09:31:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2022\/10\/Cover-Images_Part2-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@workfall\" \/>\n<meta name=\"twitter:site\" content=\"@workfall\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Workfall\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"18 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#organization\",\"name\":\"Workfall - Hire #Kickass Coders On Demand\",\"url\":\"https:\/\/learning.workfall.com\/learning\/blog\/\",\"sameAs\":[\"https:\/\/www.instagram.com\/workfall\/\",\"https:\/\/www.linkedin.com\/company\/workfall\/\",\"https:\/\/facebook.com\/workfall\",\"https:\/\/twitter.com\/workfall\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/i1.wp.com\/18.141.20.153\/learning\/blog\/wp-content\/uploads\/2021\/10\/cropped-WF_logo.png?fit=400%2C400\",\"contentUrl\":\"https:\/\/i1.wp.com\/18.141.20.153\/learning\/blog\/wp-content\/uploads\/2021\/10\/cropped-WF_logo.png?fit=400%2C400\",\"width\":400,\"height\":400,\"caption\":\"Workfall - Hire #Kickass Coders On Demand\"},\"image\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#website\",\"url\":\"https:\/\/learning.workfall.com\/learning\/blog\/\",\"name\":\"The Workfall Blog\",\"description\":\"#Tech #Remote #Jobs\",\"publisher\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/learning.workfall.com\/learning\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/#primaryimage\",\"url\":\"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2022\/10\/Cover-Images_Part2-1.png\",\"contentUrl\":\"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2022\/10\/Cover-Images_Part2-1.png\",\"width\":1200,\"height\":628,\"caption\":\"How to set up a PM2 daemon process manager for a Node.js application?\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/#webpage\",\"url\":\"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/\",\"name\":\"How to set up a PM2 daemon process manager for a Node.js application? - The Workfall Blog\",\"isPartOf\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/#primaryimage\"},\"datePublished\":\"2022-10-04T05:46:51+00:00\",\"dateModified\":\"2025-09-25T09:31:40+00:00\",\"description\":\"PM2 is a Node.js process manager with an integrated load balancer. It makes production deployments easier and allows us to keep running apps.\",\"breadcrumb\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/learning.workfall.com\/learning\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to set up a PM2 daemon process manager for a Node.js application?\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/#webpage\"},\"author\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/person\/cab8236044692bc5b27606b13167794a\"},\"headline\":\"How to set up a PM2 daemon process manager for a Node.js application?\",\"datePublished\":\"2022-10-04T05:46:51+00:00\",\"dateModified\":\"2025-09-25T09:31:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/#webpage\"},\"wordCount\":1632,\"publisher\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2022\/10\/Cover-Images_Part2-1.png\",\"keywords\":[\"node\",\"nodeJS\",\"PM2\",\"processmanagement\",\"processmanager\",\"workfall\"],\"articleSection\":[\"Backend Development\"],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/person\/cab8236044692bc5b27606b13167794a\",\"name\":\"Workfall\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2023\/09\/avatar_user_1_1693914404-96x96.png\",\"contentUrl\":\"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2023\/09\/avatar_user_1_1693914404-96x96.png\",\"caption\":\"Workfall\"},\"sameAs\":[\"https:\/\/www.workfall.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to set up a PM2 daemon process manager for a Node.js application? - The Workfall Blog","description":"PM2 is a Node.js process manager with an integrated load balancer. It makes production deployments easier and allows us to keep running apps.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/","og_locale":"en_US","og_type":"article","og_title":"How to set up a PM2 daemon process manager for a Node.js application? - The Workfall Blog","og_description":"PM2 is a Node.js process manager with an integrated load balancer. It makes production deployments easier and allows us to keep running apps.","og_url":"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/","og_site_name":"The Workfall Blog","article_publisher":"https:\/\/facebook.com\/workfall","article_published_time":"2022-10-04T05:46:51+00:00","article_modified_time":"2025-09-25T09:31:40+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2022\/10\/Cover-Images_Part2-1.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_creator":"@workfall","twitter_site":"@workfall","twitter_misc":{"Written by":"Workfall","Est. reading time":"18 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/learning.workfall.com\/learning\/blog\/#organization","name":"Workfall - Hire #Kickass Coders On Demand","url":"https:\/\/learning.workfall.com\/learning\/blog\/","sameAs":["https:\/\/www.instagram.com\/workfall\/","https:\/\/www.linkedin.com\/company\/workfall\/","https:\/\/facebook.com\/workfall","https:\/\/twitter.com\/workfall"],"logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/i1.wp.com\/18.141.20.153\/learning\/blog\/wp-content\/uploads\/2021\/10\/cropped-WF_logo.png?fit=400%2C400","contentUrl":"https:\/\/i1.wp.com\/18.141.20.153\/learning\/blog\/wp-content\/uploads\/2021\/10\/cropped-WF_logo.png?fit=400%2C400","width":400,"height":400,"caption":"Workfall - Hire #Kickass Coders On Demand"},"image":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/logo\/image\/"}},{"@type":"WebSite","@id":"https:\/\/learning.workfall.com\/learning\/blog\/#website","url":"https:\/\/learning.workfall.com\/learning\/blog\/","name":"The Workfall Blog","description":"#Tech #Remote #Jobs","publisher":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/learning.workfall.com\/learning\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/#primaryimage","url":"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2022\/10\/Cover-Images_Part2-1.png","contentUrl":"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2022\/10\/Cover-Images_Part2-1.png","width":1200,"height":628,"caption":"How to set up a PM2 daemon process manager for a Node.js application?"},{"@type":"WebPage","@id":"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/#webpage","url":"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/","name":"How to set up a PM2 daemon process manager for a Node.js application? - The Workfall Blog","isPartOf":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/#primaryimage"},"datePublished":"2022-10-04T05:46:51+00:00","dateModified":"2025-09-25T09:31:40+00:00","description":"PM2 is a Node.js process manager with an integrated load balancer. It makes production deployments easier and allows us to keep running apps.","breadcrumb":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/learning.workfall.com\/learning\/blog\/"},{"@type":"ListItem","position":2,"name":"How to set up a PM2 daemon process manager for a Node.js application?"}]},{"@type":"Article","@id":"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/#article","isPartOf":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/#webpage"},"author":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/person\/cab8236044692bc5b27606b13167794a"},"headline":"How to set up a PM2 daemon process manager for a Node.js application?","datePublished":"2022-10-04T05:46:51+00:00","dateModified":"2025-09-25T09:31:40+00:00","mainEntityOfPage":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/#webpage"},"wordCount":1632,"publisher":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/#organization"},"image":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/pm2-daemon-process-manager-for-a-node-js-application\/#primaryimage"},"thumbnailUrl":"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2022\/10\/Cover-Images_Part2-1.png","keywords":["node","nodeJS","PM2","processmanagement","processmanager","workfall"],"articleSection":["Backend Development"],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/person\/cab8236044692bc5b27606b13167794a","name":"Workfall","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/person\/image\/","url":"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2023\/09\/avatar_user_1_1693914404-96x96.png","contentUrl":"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2023\/09\/avatar_user_1_1693914404-96x96.png","caption":"Workfall"},"sameAs":["https:\/\/www.workfall.com"]}]}},"jetpack_featured_media_url":"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2022\/10\/Cover-Images_Part2-1.png","jetpack-related-posts":[{"id":226,"url":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-build-and-deploy-a-mern-stack-application-on-aws\/","url_meta":{"origin":1397,"position":0},"title":"How to build and deploy a MERN Stack Application on AWS?","date":"October 27, 2021","format":false,"excerpt":"Do you have a wonderful product idea that keeps springing into your head? However, not sure which technology or framework to adopt for easier and faster deployment of scalable web applications, you can go for MERN Stack.\u00a0 A MERN Stack is a collection of front-end, back-end, and database components that\u2026","rel":"","context":"In &quot;AWS Cloud Computing&quot;","img":{"alt_text":"Build and Deploy a MERN Stack Application on AWS","src":"https:\/\/i2.wp.com\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2021\/10\/MERN.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":675,"url":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-set-up-a-continuous-deployment-pipeline-to-deploy-versions-of-an-application-on-aws-elastic-beanstalk-using-aws-codepipeline-part-1\/","url_meta":{"origin":1397,"position":1},"title":"How to set up a continuous deployment pipeline to deploy versions of an application on AWS Elastic Beanstalk using AWS CodePipeline (Part 1)?","date":"November 24, 2021","format":false,"excerpt":"Do you have concerns about managing and deploying web applications? With AWS Elastic Beanstalk, you can launch your full web application in just a few minutes by simply uploading the code. Starting with capacity provisioning, load balancing, auto-scaling, and application health monitoring, this service will take care of the whole\u2026","rel":"","context":"In &quot;AWS Cloud Computing&quot;","img":{"alt_text":"AWS Elastic Beanstalk - Workfall","src":"https:\/\/i2.wp.com\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2021\/11\/CoverImages_1200x628px-6.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1038,"url":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-use-aws-ssm-parameter-store-in-aws-elastic-beanstalk-instances\/","url_meta":{"origin":1397,"position":2},"title":"How to use AWS SSM Parameter Store in AWS Elastic Beanstalk instances?","date":"July 12, 2022","format":false,"excerpt":"Almost every developer makes use of environment variables. They are excellent for establishing parameters that alter depending on the system's surroundings. Sadly, they struggle to scale. There are methods to accomplish it, but they aren't enjoyable. Here's why AWS can replace environment variables (or at least reduce your reliance on\u2026","rel":"","context":"In &quot;AWS Cloud Computing&quot;","img":{"alt_text":"AWS SSM Parameter Store in AWS Elastic Beanstalk instances","src":"https:\/\/i1.wp.com\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2022\/07\/Cover-Images_Part2-1-1.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":639,"url":"https:\/\/learning.workfall.com\/learning\/blog\/ros-ci-pipeline-using-aws-robomaker-and-codepipelinepart-1\/","url_meta":{"origin":1397,"position":3},"title":"How to build a ROS CI Pipeline using AWS RoboMaker and CodePipeline(Part 1)?","date":"November 11, 2021","format":false,"excerpt":"Robots are being used more widely in society for increasingly sophisticated functions like picking and packing, last-mile delivery, complex assembly, search and rescue, environmental monitoring, and assisted surgery. Robots are utilized for commercial logistics and consumer cleaning, distribution, and companionship in the autonomous mobile robot (AMR) and autonomous ground vehicle\u2026","rel":"","context":"In &quot;AWS Cloud Computing&quot;","img":{"alt_text":"AWS RoboMaker - Workfall","src":"https:\/\/i2.wp.com\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2021\/11\/RoboMaker1.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1193,"url":"https:\/\/learning.workfall.com\/learning\/blog\/amazon-devops-guru-for-serverless\/","url_meta":{"origin":1397,"position":4},"title":"Amazon DevOps Guru for Serverless","date":"September 6, 2022","format":false,"excerpt":"With digitalization and the cloud assuming responsibility for the development and deployment of new features in software applications, error handling is a critical activity that aids in faster deployment. Any error in the chain, from writing code to deploying to monitoring performance, can degrade customer experience, increase costs, or immediately\u2026","rel":"","context":"In &quot;DevOps&quot;","img":{"alt_text":"Amazon DevOps Guru","src":"https:\/\/i1.wp.com\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2022\/09\/Cover-Images_Part2-1.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1508,"url":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-perform-encryption-and-decryption-of-messages-using-crypto-in-node-js\/","url_meta":{"origin":1397,"position":5},"title":"How to perform encryption and decryption of messages using Crypto in Node.js?","date":"November 8, 2022","format":false,"excerpt":"Web applications have access to massive amounts of data belonging to individuals, organizations, and governments. The more data that is accessed, the greater the risk to data security. Cryptography and encryption techniques are used by software developers to protect sensitive data from malicious parties. Cryptography is used to protect data\u2026","rel":"","context":"In &quot;Backend Development&quot;","img":{"alt_text":"How to perform encryption and decryption of messages using Crypto in Node.js?","src":"https:\/\/i1.wp.com\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2022\/11\/Cover-Images_Part2-1.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/posts\/1397"}],"collection":[{"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/comments?post=1397"}],"version-history":[{"count":5,"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/posts\/1397\/revisions"}],"predecessor-version":[{"id":2983,"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/posts\/1397\/revisions\/2983"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/media\/1398"}],"wp:attachment":[{"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/media?parent=1397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/categories?post=1397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/tags?post=1397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}