How to Deploy a react app using PM2 on CentOS Stream 9

To deploy a React app using PM2 on CentOS Stream 9, follow the steps below.

Step 1 : Install PM2 using npm

Step 2 : Run PM2 startup to configure system startup scripts

Step 3 : Create a React app

Step 4 : Navigate to the React app directory

Step 5 : Build the React app

Step 6 : Run the React app with PM2

Step 7 : If using Firewall. Allow traffic on the specified port (e.g., 3000)

Step 8 : Test the app by opening it in a browser

Step 9 : Manage the Application using PM2 commands

- Check the status:

- Restart the app:

- Reload the app:

- Stop the app:

- Delete the app from PM2:

Congratulations! You have successfully deployed a React app using PM2 on CentOS Stream 9.