how to deploy a react app code example

Example 1: command to create react app

npx create-react-app my-app
cd my-app
npm start

Example 2: create react app deployment heroku

npm install -g create-react-app
create-react-app my-app
cd my-app
git init
heroku create -b https://github.com/mars/create-react-app-buildpack.git
git add .
git commit -m "react-create-app on Heroku"
git push heroku master
heroku open

Example 3: how to upload react js project on server

npm install --save-dev ftp-deploy