Subscriber only lesson.
Sign up to this course to view this lesson.
About this lesson
Download this lesson’s exercise file.Building a Templated Website - Push Live Code to Heroku.docx
Building a Templated Website - Push Live Code to Heroku
Now that our new Resume app is finished, save your code to git, push it to github, and then push it to Heroku.
When to use
You'll want to save your code to git often, but this was a short project so we can wait till we're finished.
Since this is a new project with a new workspace, initialize git again:
git config --global user.name "Your Name"
git config --global user.email "Your Email"
git config --global push.default matching
git config --global alias.co checkout
Then login to github and add your keys if you haven't already:
Then create a new repository at github.
Save your code in the terminal:
git add .
git commit -am "initial commit"
Then push your code to github.com with the instructions they gave you when you created your repository.
Push Your Code To Heroku
Log in to Heroku from the terminal:
Add your SSH keys:
Create an App:
Rename the index.html file to index.php, then save your code to git again (push to github.com)
Push your code to Heroku:
git push heroku master
Finally, rename your app if you like:
heroku rename ENTER_NAME
Hints & tips
- Be sure to initialize git again since this is a new workspace.
- You probably don't need to add your SSH keys to github again.
- Don't forget to rename index.html to index.php for Heroku.
Lesson notes are only available for subscribers.