How to Deploy a react app using PM2 on Fedora 39

To deploy a React app using PM2 on Fedora 39, follow these steps.

Step 1 : Install PM2: Open your terminal and run the following command to install PM2 globally using npm:

Step 2 : After installing PM2, run the following command to set up PM2 startup script:

This will generate a command that you need to execute to enable PM2 to start on boot.

Step 3 : Use the following command to create a new React app (replace "my-react-app" with your preferred app name):

Step 4 : Build the app

Navigate to the app's directory:

Build the app using:

Step 5 : Execute the following command to start serving the React app with PM2:

Step 6 : Open your browser and navigate to http://ip:3000 to test your deployed React app.

Step 7 : Manage the Application

- To check the status of the app:

- To restart the app:

- To reload the app:

- To stop the app:

- To delete the app from PM2:

Congratulations! You have successfully deployed a React app using PM2 on Fedora 39.