22
loading...
This website collects cookies to deliver better user experience
npm install gh-pages —save-dev
“homepage": “http://{username}.github.io/{repo-name>}
“predeploy”: npm run build”
“deploy”: “gh-pages -d build:
npm run deploy
this will create a production build of your react application and also create a new gh-pages branch where it will store this build.
Now go to github repo to make sure everything is working properly
heroku login
heroku create
git push heroku main
heroku run rake db:migrate
heroku open
git push heroku main
. heroku stack
will show you the available stacks heroku stack:set <new stack to switch to>
This will switch to a new stack. Now try to redeploy..gitignorge
or .env
file make sure to add them to your config vars. You can do this by going to Heroku app setting tab. In this tab, you will see config vars. Click reveal config vars and add the api key there. cors.rb
file make sure to update with the new url that you have for your frontend. I have spent hours trying to figure out why my frontend wasn’t talking to my backend because of this... So make sure to update your cors.rb
.