Locked lesson.
About this lesson
Let's do a few odds and ends to finish up.
Exercise files
Download this lesson’s related exercise files.
Finishing Up.docx59.3 KB Finishing Up - Solution.docx
59.3 KB
Quick reference
Finishing Up
Time to finish up the app!
When to use
Do this at the end of creating an app.
Instructions
Our app is done. Now it's time to save our code to git, push it to github, and then push it to Heroku!
Save the code to git and push it to github:
git add .
git commit -am "final flashcard app"
git push
Push your code to Heroku:
git push heroku master
Thats it!
Hints & tips
- Save code to git
- Push code to github
- Push code to heroku
- 00:04 Okay, so let's finish up a couple of things,
- 00:06 I wanna add one more quick include.
- 00:08 And, it's just gonna be this footer guy right here.
- 00:12 So let's run over here, create a new file.
- 00:14 Let's call it footer.php, open this, paste this in.
- 00:19 It's good, save it, close it.
- 00:22 Now let's just create a quick php tag and include footer.php.
- 00:31 Copy this, save this file.
- 00:33 Come up here and hit reload to make sure everything looks okay, looks good.
- 00:37 So let's just run through here real quick.
- 00:40 Paste this on all of these pages.
- 00:45 Division, save, come back here and check subtraction,
- 00:50 multiplication, division, okay, looks good.
- 00:54 So, we've done an awful lot, and you may have forgotten, well first off,
- 00:58 before I get into that, let's just look at these pages.
- 01:01 Already, things are starting to look simpler by adding
- 01:04 our include stuff that takes up all that copyright and all those line breaks.
- 01:09 Our include header gets rid of all those links at the top and
- 01:12 already the page is looking simpler.
- 01:15 And we can template this out even more if we wanted to, but
- 01:17 I think you get idea know why it's important and
- 01:20 it's just easier to read your code with less code on the page.
- 01:23 So anyway, let's call this app done.
- 01:26 Now, way back in the beginning of the course,
- 01:28 we did version control with our code and
- 01:30 we haven't actually saved any of our codes since then, so let's do that now.
- 01:34 If you've forgotten by now, this is a good chance to relearn that stuff.
- 01:37 So, we save our code, we come down to the terminal, we type git, add, and
- 01:41 the period.
- 01:42 And remember, the period means all of the stuff that's been changed,
- 01:46 all of the files you've created, all the code you've created,
- 01:49 all this stuff here on the left-hand side we want to add.
- 01:52 So git, commit, am.
- 01:55 Now, we need a commit message and we've done a lot of stuff.
- 01:58 So let's just say created math flashcard app.
- 02:04 And, if I pull this screen up, you can see this is all the stuff that's being added,
- 02:09 it's all of these files.
- 02:11 Ten files of change, 233 insertions, three deletions.
- 02:15 And so it's kinda interesting to look at that if you haven't done this in a while.
- 02:18 Pull that back down.
- 02:19 And, so finally to push this back up to GitHub, remember it's git push.
- 02:24 And boom, boom, boom, just like that, it's done.
- 02:26 Now, we also remember at the beginning of the course, we created this Heroku app, so
- 02:31 we can also now push that up to Heroku.
- 02:33 We do git push heroku master, and it's building the source.
- 02:39 It takes a couple minutes sometimes.
- 02:40 PHP files, it tends to take less time than a Ruby on Rails file.
- 02:44 And just like that, we're done.
- 02:45 Now if we come back, remember this is the URL for our Heroku app.
- 02:49 If we click reload, here is our fully functioning math flashcard app.
- 02:54 And this is completely live.
- 02:56 52, wrong.
- 02:58 You can send people to this and it's good to go.
- 03:01 So, that's the course, we're done.
- 03:03 And as PHP, I hope you enjoyed yourself, I really enjoyed teaching you,
- 03:07 and thanks for watching.
Lesson notes are only available for subscribers.