1npm install -g create-react-app
2create-react-app my-app
3cd my-app
4git init
5heroku create -b https://github.com/mars/create-react-app-buildpack.git
6git add .
7git commit -m "react-create-app on Heroku"
8git push heroku master
9heroku open
10
1npm install gh-pages --save-dev
2package.json
3//...
4"homepage": "http://gitname.github.io/react-gh-pages"
5//...
6"scripts": {
7 //...
8 "predeploy": "npm run build",
9 "deploy": "gh-pages -d build"
10}
11git init
12git remote add origin https://github.com/gitname/react-gh-pages.git
13npm run deploy
14git add .
15git commit -m "Create a React app and publish it to GitHub Pages"
16git push origin master
17
1npm run build // Build The Project
2npm install -g serve // Install Serve Server
3serve -s build -l 4000 // deploy the Build Using Serve
1npm install --save typescript @types/node @types/react @types/react-dom @types/jest
2
3# or
4
5yarn add typescript @types/node @types/react @types/react-dom @types/jest