Skip to content

Alizcode/deploy-at-heroku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

  1. Create a new React App and have your acc at Heroku -- cd into your project
  2. Make sure you have node-modules and package json in your project
  3. Check the versions of your Node and NPM with '$ node -v and npm -v' respectively
  4. Goto Json file, before dependencies write versions like below (outside dependencies or scripts)
"engines": {
    "node": "16.0.0",
    "npm": "8.3.0"
},
  1. run '$ npm run build' if your are on windows or Mac go there 'https://devcenter.heroku.com/articles/heroku-cli#download-and-install '
  2. run "$ heroku --version" if there is no version the "sudo snap install --classic heroku"
  3. run '$ heroku login'
  4. when you are successfully logged-in run '$ heroku create app-name-of-ur-choice', if successful it will give you two links one for your github: https://git.heroku.com/test-app.git second URL to your app: https://test-app.herokuapp.com/
  5. run '$ git init'.
  6. then run '$ git remote add heroku and the github link that you got after step 7, e.g "git remote add heroku https://git.heroku.com/test-app-react2626.git".
  7. run '$ git remote -v' you will get something like this heroku https://test-app.herokuapp.com/ (fetch) heroku https://test-app.herokuapp.com/ (push)
  8. "$ git add . && git commit -m 'message'"
  9. and at last run "$ git push heroku master"

if you make changes to your project run

 "$ npm run build"
 "$ git add . && git commit -m 'message'"
 "$ git push heroku master"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published