-
Authenticate
heroku login
-
Open the app in the browser (from terminal)
heroku open
-
See logs
heroku logsheroku logs -n 200heroku logs --tail(display logs real-time)
-
Open a command line terminal in our Heroku server
heroku run bash- Note: this can be helpful, for example, if we want to run our seed file (once you're there, you can execute the seed file on the heroku server, ex:
node bin/seed.js)
-
Option 1: manual deploy
- Setup: we need to install heroku CLI + configure heroku as a remote repository (details here)
- To deploy on production (push our code to the remote repository on heroku):
git push heroku main
-
Option 2: automatic deploys from GitHub
- Setup: configure automatic deploys (details here)
- To deploy on production: push your code to github (ex.
git push origin main)
Extra: Setup to work in pairs (so that all members can push to Heroku)
Student 1 = the one that deployed the project on heroku
Student 2 = any other student/s in a team
Steps:
go to the root directory of m2-projectheroku login(browser will open)heroku git:remote -a nameOfOurProject