This is equivalent to running the application, only thing is we use pm2 to run it. Is there a way to deploy the build file of the react application using pm2 ? This way would have browser compatibility issues if I'm not wrong.
In order to deploy the react build file:- Step 1:
npm run build
Step 2:
pm2 serve build/ 3000 --name "react-build" --spa
The "react-build" is just an alias name for the pm2 process. "--spa" is optional as well. "build/" is the folder in which the build files are stored
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This is equivalent to running the application, only thing is we use pm2 to run it. Is there a way to deploy the build file of the react application using pm2 ? This way would have browser compatibility issues if I'm not wrong.
In order to deploy the react build file:-
Step 1:
npm run build
Step 2:
pm2 serve build/ 3000 --name "react-build" --spa
The "react-build" is just an alias name for the pm2 process. "--spa" is optional as well. "build/" is the folder in which the build files are stored