Skip to content

Instantly share code, notes, and snippets.

@M-ZubairAhmed
Last active February 19, 2018 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save M-ZubairAhmed/09d4c9b95dd9fd58f204d81d79b821d8 to your computer and use it in GitHub Desktop.
Save M-ZubairAhmed/09d4c9b95dd9fd58f204d81d79b821d8 to your computer and use it in GitHub Desktop.
Deploying React app bootstrapped with CRA to Heroku

Creating heroku app with cli

heroku create $APP_NAME --buildpack https://github.com/mars/create-react-app-buildpack.git

with npx

npx heroku-cli create $APP_NAME --buildpack https://github.com/mars/create-react-app-buildpack.git

Renaming app

heroku apps:rename newname

with npx

npx heroku-cli apps:rename newname --app oldname

Updating git remotes

git remote rm heroku
heroku git:remote -a newname

with npx

git remote rm heroku
npx heroku-cli git:remote -a newname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment