deploy react app code example

Example 1: react create app

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

Example 2: react js build production

npm run build

Example 3: 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 4: create react app

npm install --save typescript @types/node @types/react @types/react-dom @types/jest

# or

yarn add typescript @types/node @types/react @types/react-dom @types/jest

Example 5: how to upload react js project on server

npm install --save-dev ftp-deploy