xxxxxxxxxx
pm2 serve myReactApp/ 3000 --name "my-react-app" --spa
xxxxxxxxxx
# install pm2
# CD inside app folder
# for Yarn
yarn build
pm2 start "yarn start" --name my-react-app --max-memory-restart "200M" --log "../my-react-app.log"
# for NPM
npm run build
pm2 start "npm run start" --name my-react-app --max-memory-restart "200M" --log "../my-react-app.log"
pm2 startup
pm2 save
xxxxxxxxxx
pm2 start my-app/node_modules/react-scripts/scripts/start.js --name "my-app"