Heroku using Node.js | Chris Worfolk | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Heroku using Node.js

teacher avatar Chris Worfolk

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

35 Lessons (53m)
    • 1. Introduction

    • 2. Creating a Heroku account

    • 3. Installing the Heroku CLI

    • 4. Installing Git on Windows

    • 5. Installing Heroku CLI on Windows

    • 6. Using Git Bash on Windows

    • 7. Heroku architecture

    • 8. Installing Express

    • 9. Writing our first app

    • 10. Creating a git repo

    • 11. Connecting to Heroku

    • 12. Adding a Procfile

    • 13. Redeploying the app

    • 14. What are config vars?

    • 15. Running project 2

    • 16. Adding a local config variable

    • 17. Pushing to Heroku

    • 18. Remote config variables

    • 19. Config vars in the dashboard

    • 20. What are add-ons?

    • 21. Running project 3

    • 22. Using Redis

    • 23. Deploying the app

    • 24. Redis add-on

    • 25. Redis in action

    • 26. Add-on documentation

    • 27. Resources and elements

    • 28. Running project 4

    • 29. Breaking the app

    • 30. Viewing the logs

    • 31. Rolling back

    • 32. Exploring the dashboard

    • 33. Changing dyno type

    • 34. Configuring SSL and domains

    • 35. Final thoughts

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

Want to join the cloud hosting revolution? This class will take you step-by-step through deploying your first four NodeJS websites using Heroku. You will learn how to deploy code, use add-ons such as Redis, set config vars, troubleshoot errors and more.

Meet Your Teacher

Chris Worfolk is a psychologist and software consultant. He is the author of How To Exit VIM and Do More, Worry Less.

See full profile

Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. Introduction: Welcome to this class on using the Heroku hosting platform and deploying node-based applications. Mercury is one of my favorite hosting platforms, and I'm sure that you are gonna love it to. By the end of this class, you'll have deployed your first for web applications into the Heroku cloud. I'm Chris. I've been a software consultant for 15 years now and I can't wait to share my knowledge and my passion of Heroku review. So let's get started. 2. Creating a Heroku account: If you have a brand new to her Roku, the first thing you want to do is get yourself a Hiroko account, such its head over to Roku dot com on click Sign up and then just fill out this form at the time off recording. You don't need to put a credit card in to get your account active. You can do about that, but if you do put a credit card in, then it will give you more flexibility in terms of the number of APS you can create. You will need to delete some of the old APS before creating new ones if you creating a lot of them so it can be handy. But you don't need at the time. Once you've got your account, then let's move on to the next lesson. 3. Installing the Heroku CLI: everything will need is the Roku CLI, which is the command line tools that were used in the terminal on Mac and Lennix and in command prompt or the bash shell on Windows. Easiest way to find it is just to Google it. And here, depending on your platform, you'll get the instructions based on Mac windows, all the next subject. Follow those instructions to get it running. Andi. Once you have it running, you'll be able to go to your terminal. You can see I've got it here. Once you've installed that, you also need to log in with your Hiroko account on the way we do that, as we just do her Roku lock in, hit any key to open a browser window, and it will last me toe logging in the browser. In this case, I'm already logged in, but I can get for it again. And then if we go back to here, it says, Great. I'm now logged in as me. So get the Hiroko seal I installed used. The heroic you log in command should be pretty straightforward if you're on a UNIX based system like Mac. If no, there's a Windows module in this course if you need a little extra help in doing this, but hopefully we'll all get there to the point where we've got the cli were all logged in and we can start writing some code. 4. Installing Git on Windows: Hey, guys, I just wanted to throw in this additional lesson to help Windows users get set up because I know one or two off. The students on the course have had a bit of problems with that, so the easiest way to do it is first off, you probably already using git. But if you know we want to go on download, get this lesson might take a while because everything on Windows is slow. If we go toe these downloads on, wait this page to load, you're probably on a 64 bit machine. I'm on a 32 here, so I'll just go ahead and grab this foot. Tube it. It's already downloading canceled. I want you. It's wait for this to download. There it is nearly downloads folder when it is still downloading. No, that's cancel out a moat strike and stilled on learning. But so let's hope that's happened there. I was going to do that. While we're doing that will also go find that heroic. Ooh, command line interface. Now, there you go. It's finished downloading now. Great. So we can install this just by finding in our downloads folder on double clicking. It It's like, Yes, there a large. It's wait for the get installer to open. There we go. Those options are fine here, I would recommend probably going for tech ises commit houses. That's fine. All of that's fine clicking store. I won't let us do its thing so well after winning, we also want her Roku cli We get to download and install again. I'm going to get the 32 bit. You're probably on the 64 bit. Okay, great. That's downloading. Andi get is installing in the background as well. Okay, great. Hiroko is finished downloading. So if you already got get installed and you're already using get which I presume you are, you won't need to do this step. But if you haven't, then this is a good way to go. It's going to take a bit of time for this to do its thing. So we'll just leave this to spend on will pick it up again in the next lesson. 5. Installing Heroku CLI on Windows: So it's finally finished in Starling Onda. We don't need to release now so we can take that and click finish. And then next thing wanna do is go to this heroic Ooh, installer and install as well. This will install the actual hero QC ally if you get this window stop smart screen message if you click. Okay, nothing will happen. So you want to go to more info and click ruined anyway, on click? Yes. And this will open up the Hiroko installer. I want all of those things that profits Fine. And then this will start installing as well. So this is the actual total that Roque who provide that will plug into our command line on again. This is just going to spend a while spinning. So I will pause the video here, and we can pick this up when this is finished in the next lesson. 6. Using Git Bash on Windows: Once the Roku installs finished, we can hit close. And then if we go down to start and get our ups scroll across, we can now open get bash which you may have already heard. Or it may be new if you just installed it for the first time, we still like that. This will allow us to an r get commands in here. But also importantly, it will now allow us to win the Roku commands as well. So that we got the hair Oecussi Alliance told as well, so you can use this. Get cash for both you get and her Roku commands when you working on windows. 7. Heroku architecture: Let's take a moment to look at how the Baroque architecture in system is laid out. So start of our source code. That's our website, a Web application, and we'll standing off to the heroic a platform on on her. Okay, we can have multiple applications. If we've got, say, multiple websites, each one would be a separate application, and then we've in that application. We have a bunch of what Eroica calls Dino's on. We could think of these as processes on a CPU. We could think of these as individual Web servers so we could have one Web application website having multiple Web servers or Web Dino's, as Haruka calls them. And as well of Web Dino's. We can have worker Dino's, which are processes that sit in the background and do things like read off cues like maybe someone signs up and you have a separate que to send the mail later. That could be a worker diner. And so all of dicks yourself by Roku. And then that's what faces the public. We tell it which Web diagnose to serve the content from So the Roku platform is hosting platforms officers kind of ah, virtual server it's It's a SAS platform on. We just We give it the source code. We tell it how we want it to configure these virtual servers, and it serves up to the users. And we can configure these. Dino's in a bunch of different ways so we can say how many diners we want. We can have. Some was worker. Diners have some hours reading off a. Q. We can tell the diner walk version of node we want it to use on. We can tell it what dependencies we want to use as well. So the process is we create a Web application. We then and somehow Roku conflict. Tell her, Okay, how to configure everything. We push that coat up to Hiroki using git on Haruka, then deploys it so that everyone else can access it. 8. Installing Express: we're gonna start by building our app. And to do that, we're going to use the express framework in no jazz, which is the most popular framework for building Web sites. So I'm going to go to a clean directory here. Nothing in it at all on. I'm gonna start a new node project using NPM. So use an PM in it on. We can pretty much chips that yes, to all of these questions. Okay, girls, that's given us our package dot Jason, which will have all our NPM dependencies in. And that Then let's go ahead and install Express will do NPM install Express. I'll save it because we want that to be one of the dependencies we're gonna use when we push to production. Cool. So we've now got our node modules. We've got our package lock file or very standard no Js project. We've got expressed as a dependency and we can start writing our app 9. Writing our first app: it was create a simple index jazz. So bringing in express on, then we'll can express out define our default route on. We'll just do a classic hello world Save that as index dot Js In fact, on a string and test flight on the twos, back ticks, then we get Okay, so let's go over to our command line now. We'll run that if we get a local host. 3000 Perfect, we have Ah, hello world running. So we now have a Web app. It's not very exciting. It doesn't do much, but technically we do have one. So let's go ahead on push up to here, OK? 10. Creating a git repo: we've create our little express up on the way we pushed things to. Hiroko is using git. So let's go ahead and create. Get repository of Just cancel this for now. I'll start by using Get in it to initialize the new repo. If we do it, get starters. We should see none of the files have been added yet we need to add to get ignore because we don't want to commit the node modules because we want those to be installed at one time by her Roku. That's that's at standard ignore file Save it is Don't get ignoring the root on that great known modules have disappeared after whatever I can do get status. We now go get ignore fire, but and of modules are gone. It's like perfects. Let's anthem all and let's go ahead and just say initial commit. If we do final getting status, we can see everything is up to date. Great. So we're ready to push. It's up to her. Roku 11. Connecting to Heroku: we've gotta get Repo. And finally, we're ready to win some Hiroko commands on the way we create a new app on Hiroko is just run Roku create on that. Set something up for his brilliant So next thing, if we can tell Roku to push our code up, let's go. I had on do it. It's just get push and I want to be heroic, you master. So it sets up a remote repo under the name Hiroko on when we want to push the code up. We just do a get push to the master branch of her Roku, and it will do its thing. So it's spending away. Once this is done, we'll go back and explore what's going on here. So it's a kind of standard get pushed to here and then he Rocca takes over Texas and no Js app stops building the runtime environment on it will install all of the dependencies from us. So at the moment we just got one dependency, which is expressed. But it would go away and get all the node modules Frommer's and it will take them from the package lock file because it wants to match what we've got installed locally. So it's a production deployment and then goes head on and builds all of that and gets the process running, which works buying a little bit more. So that looks like it's fine. Let's go ahead and run, Hiroko. Open toe, open the Web app and we find it's broken. What's going on here? Well, we haven't actually told her. Okay, what we want to do or how we wanted to run it. So you remember when we went to the command line? We did node index dot Js. But we haven't told her Roku how to do that yet. So we need to do that on the way we do. That is with a product file. Let's look at that in the next lesson. 12. Adding a Procfile: So we've pushed our app upto Hiroko here. But we haven't told her Roku how to run it on their several changes. We're gonna make their including Prock file. So one of the changes we want to make is here. We want to tell her Roku exactly what we want it to run on, because in this case, we're using node on weaken. Give it the version of node that we wanted to run. So if you want to use a specific version of node even put laying here on that will mean that our development environment on a production environment could be synchronized on. Roku has support for a bunch of different versions. Next thing we're going to need is Brock file product file tells us what processes we want Arocha to run. So in this case, which it's going to create, warned, which is a web. But we could scale this up with multiple processes, including behind the scenes processes, processing, data, processing cues on and more Web processes. And are we gonna do is tell it to run index dot Js on note and the way we do this is just got popped file the extension in the root directory just comic book file, and that's all we need to do. And there is one additional problem now is that there's no port here. And if you convert when we run index dot Js we hard coded into 3000 fit on her Roku heroic . Who needs to be able to tell us what poor it wants us to use on? Wait does that is via an environmental variable. So instead of hard coding, Mr 3000 we're gonna change it to the port. And therefore, when Erica runs us, it will pass imports and environmental variable and will then listen on that port with our express app, which we're running because off the proper fire week raid tells it to run index dot Js. Okay, so there's all the changes we need to do. Let's commit them, push them up on and see it running 13. Redeploying the app: Let's go ahead and commit our changes and redeploy them so that we can see we've got some changes. And the new park file its adult lows. Yeah, on then to deploy again, We just do get pushed. Arocha Master, wait for their deployment. Teoh do its stuff. Yeah, Nice. And then once again, we can just do her OK open. And that will open a Web browser. And then we go live on her. Roku, we have our first application. All it does it say hello world. Not the fanciest of thing. But we have successfully deployed our first Hiroko up, and now we can go on to do more exciting things. 14. What are config vars?: let's start by understanding what conflict vowels are. So some conflict. We don't want to start in the code in the application in the repository itself, but we wanted to live outside. For example, Is this a production environment or a development environment? Well, we can't stall in the code because we want the same code running on production and development, so that needs to be an external variable. Similarly, things like sensitive passwords you probably don't want to store in your source code and database, logging details and also any service you girls. Maybe you've got a primary database in a backup database, and you want to be able to switch over to the backup database of the primary fails really quickly. So you want that you want to configure that in one time rather than have it in your source code where you need to do in the redeployment. All of these things are good. Things to store was conflict. Now, if we compare that to the way we might configure, say, Apache, what services in Apache and your virtual host, you'll have like a set end where you'll say, Okay, this is my database host and you'll specify the value in her Roku. We're basically doing the same thing. Using Hiroko's architectures for setting up these conflict bars on. We'll go through setting up one of them in this module. 15. Running project 2: must go ahead and get so with project to So I'm gonna My works best can agree in your folder called Project to and then I'm going to go to the example code here on one. This project to folder last year's copy over the files from their project to complete Has the answers in such project To is the start of files we need. Copy that in there. Good terminal CD into project to No, no one an NPM install to download all the dependencies. Okay, lovely. So to test this out, make sure it works Locally. We can run a heroic a command fold Roku local, which allows us to simulate the hurricanes stack and the conflict variables, but locally. And that's running import 5000. Perfect some scary head on and open a port 5000 local host. Okay, wonderful. So I've got this really simple photo block here for a couple of photos in on. We can start developing from here 16. Adding a local config variable: So we've got our photo block here. But what happens if we wanted to personalize it? We have the country that we were currently looking out on. May we've got multiple blog's for different countries. How would we do that? We have a conflict variable. Well, the first thing is, we need to define that variable on. All we do to that is just make them as a, um, file so we can save that into the root. And that's just going to say country equals. And we're going to use G B for this example on, then a couple of other changes. So we've now got that in the same way that we got that post available we've got here. So we now save process, end a country, which is what we called here on that give us this country variable and we just rendering this template out so we can see in the template we've already got some codes. It says if the country variable exists, then printed in this little span, let's go ahead and restart heroically local on, then refresh on perfect. So it now says trouble blawg G b reading from that conflict variable that we've created 17. Pushing to Heroku: Let's go ahead and push everything we've done so far up to her. Okay? So if we quit our curricula local get repo Quick. Look at the status. I need a get ignore file in there on 100. Predict, too Cain. Everything. That's good. Let's go out. And at that, as we've committed everything we can run a hero could create. There's a rumor instance we'll go ahead and will push up Thio uric a master again. This will go through the process of pushing the code up to Roku than Hiroko goes through the process off installing all the dependencies in that web process that we've asked it for on deploying the app to their production environment. Well done that we can run Haruka open and it will open in a Web browser for hours. Okay, nice. So here we've got trouble. Blawg running on the heroic ooh website. No country code yet because we haven't set a con fig variable on her. Okay, we only that locally. So let's go ahead and do that in the next lesson. 18. Remote config variables: we don't want to see a conflict variable on her. Okay, let's Let's go back to the command line here and will do her Roku Conficker Colon set. And then what's that country? Teoh Ireland. Just using the ice. Okay, Okay, great. So that's done on now. If we reload our webpage, it's going to take a little while because when we set a convict variable, it's like doing a deployment. Roku reloads everything, rebuilt it up with the new conflict variable which is embedded into it. So when we hit re fresh, we're kind of access in the APP For the first time on Roku Still getting started again. This will take a little while. Hopefully not too long. And hopefully what we should see is the old now stay travel blogger I e compared to when we run it locally on, we have this g b perfect so that we have it break. So where would we use this? Will will use this a lot for injecting convicts such as ports and passwords. You can also use this for things like Is it is it production or development? What kind of error? Logging. And if you got staging environment. Maybe you want things to look slightly different there, or if you're running different processes and you want each one of them to respond differently, then you can also set different conflict variables for each of your naps. 19. Config vars in the dashboard: you have a way to set comping variables in Hiroko is through the Roku dashboard. We've got this APP is just running at the world. Roku, as assigned. It gives each app a random name. If we go to heroically dashboard, we couldn't find her up here. We can go into settings on by default. The conflict valuables were hidden because you could have sensitive information passwords in there. But if I go to reveal conflict bars, then we can see that we've got country set to I 20. What are add-ons?: in this module will look at Adam's Andi full first look at what an adult is in very so Adams, our external services. So things like database logging, monitoring all of these things are on Adam. So you can goto the Roku elements, which is that kind of marketplace, and say, Okay, I want a new instance of Mongo DB or I'm gonna log my errors to Roll Bar or I want to do some searching using elasticsearch. Can you bring the service into me? It doesn't mean that we have to use Hiroko's Adams. We could quite easily interface with 1/3 party service so we could go to say Amazon on Ask them for one of their AWS databases. But it's often easier to integrate with the Roku add ons on along them. Provided free tier is well, so they're quite easy to get started with on. It's nice and easy to drop that service in and configure it quite quickly. So we look at what that might look like. We might have our Web website Web application on we using a post Greste database or go on grab Post press add on. We want to send some transactional email when the user registers, we want to send them a hello email so we might bring in male gun for that with longer errors to new relic on. If we want to store things, we could send those to ask Free aws his story tendon. And I want to highlight that because Hiroki uses an ephemeral file system. So what that means is, when you re deploy an apple when you change in app, everything gets reset from the get re pope. So on a standard Web server, you might have like an uploads directory where you could upload files. And we can't do that on her Roku because every time he redeployed the app that uploads direct, who would get cleared so we can use temporary files, but nothing persistent. Nothing that will stick around there that isn't in the source code. So if we've got things like users able to or blood files or you've got a content management system where you upload images, something like that, they need to be stored in an external service. Such a mastery because we can't start on locally in Hiroko on the same way that we could on a classic Web server 21. Running project 3: Let's get ourselves up to run project free. So, a credit new director for this. Go ahead and copy of fires over from free on, then CD in to protect Free Run an NPM install again. Okay, yet nice and quick and then heroically local. Here we have that he counter up but doesn't do anything, Just says warned, Doesn't matter how many times I refresh it. Keep saying one We can use some services to help us We have doing something more interesting here. 22. Using Redis: So in this project, we're gonna make this counter count up. And to do that, we're going to use readiness. So the couple of co changes we need to make here. First of all, just cancel this for the moment on. We're gonna install, read this, and we want that to be saved A dependency. So we do. Npm install Ready Steph to save. Okay. Nice on then. In here. We're going to make use of readiness, so bring in the reddest module. That's great. Reddest client. We're gonna use this process toe end don't read. Issue are well, and we'll see where that comes from in another lesson. But basically, Hiroko is going to give us a magic red issue. A rail to connect to on. Then once we've got that here, let's fetch the data from Red s. So it's Teoh, client of GATT. We'll get a counter variable if we don't find it would just default to zero once we've got it. Well, incremental by one. So every time we run this get implemented once more move, I run the function of I'm gonna pass it in another variable. Okay. Looks good on then. Let's open a bar of template as well on where that's hard to get it to warm when they use our counter variable. That's all the code changes we need to make. Now. Let's up Hiroko sat readiness and see if it works. 23. Deploying the app: must go ahead on hook everything up to Hiroki since two a. It's gotta get Reaper burning. Andi, create a get signal file as usual. Doesn't copy over because it's ahead and file. Look. Okay. Yeah. No, it's good. Plus, after all to commit. Okay, that's all up today. Now it's Fred Hiroko up. I'm not pressure code up, which is wait for this to spend away. Now they soul is fine. Will then have the code running on Roku. But it won't work because, of course, we haven't actually set up readiness. So let's set a readiness in the next lesson. 24. Redis add-on: Let's go ahead and configure the readiness instance that we want. So we're gonna use the add ons command yet on we're gonna say heroically reddest, which is the name of the service on. Then comma on, we're gonna set the plan or tear that we want. So in this case, we just want their basic free started here, which is called Hobby Dash Dev. But if we wanted more space, more resiliency, something that that we could specify I'm or advanced plan. We'll look at how this works in elect lesson. But for now, let's just go ahead and create. Okay, Great. So we create the instance for us. It will have also created on instance variable a configuration variable that we can read. So when we went into the code and we got this red issue around creating the Adam will have created that. And so now if we when Eric Open, it should open the web up for hours on, it does. But there's an error. So let's troubleshoot that in the next lesson. 25. Redis in action: So this was a lesson in patience, the reddest close digits on initialized. Yet now it has a since I refresh is working fine on now for refresh. We can see that every time we refresh our code is getting executed. So it's reading. Reading that counter came up zero the first time on then. It's just incrementally every time we refresh on saving it in readiness. 26. Add-on documentation: what happens if you need help with the readiness and on when we can get up from the command line on. All we need to do is type Roku patterns on this time we're gonna ask for docks on, then we're going to give the name of the ad answer. In this case, it's hurricane readiness. And if we do that, it will open up the Web page containing all that heroic Redox on the hurricane Readiness on that should give us all the information we need. 27. Resources and elements: so that a couple of interesting things in the heroic a dashboard that we want to look out. That might make the Adams a bit clearer if we go into here and we go to resources and this is the counter at we've got. And as we can see, we just got one free Web diner running at the moment, which is the process than wouldn't we defined in the proper file is to say, Okay, this is like a virtual Web server. But now, under this ad on section, we've also got this Roku readiness and we can see it's a hobby, Dev. Type on. We could click this link to go to the hurricane Readiness Details Page, and I'll just bounce around. It authorizes and good to go Quinn tickets available Nice. And then we could also modify the plan here. So we've got all these different plans based on how much you want were on the whole be deaf plan, which is free, but it also take a premium plan. If we want to find out more about these plans, we can go to the market. Place in the marketplace is like the App store for Roku few and add on you can go to here on. In this case, we've got heroic. You readiness we can find out where the regions are and here we can explore all of the premium plans and what they gets us and the local red. It is just one of many different Adams. So if we g 02 here and in fact there's also Erica Reddit is Roku's kind of official reddest cluster. But there's actually a bunch of different a bunch of different providers that you could go and you could use that for. Well, if you want monitoring the bunch of monitoring solutions logging network services, search engines, a ton off, different ad owns that you can play around with here if you go into each of them, you can see the details in this case. Is any one plan? Could it still in beater? But many of them have a great deal off different options that say we wanted a mongo DB Here again, we can choose all the different options we want, starting with a free tier 28. Running project 4: Let's get up from running with Project for you should be an old hand at this now create predict four directory. Take files over from there. If we're gonna get to the command line seed into predict for that's great get ignore file as well. Say that to predict for yeah, that let's run an NPM install. Nice starting you get Repo during that looks good. So that's that committed. Ah, perfect. Now let's create a new heroic a rap just we don't with all the other projects we're gonna get pushed. Shuriken Master, send off our code on the way to Roku as we're doing most of things on Roku here. We didn't technically need to install the NPM dependencies locally, but it's nice to have them around in case we're going to run a heroically local, which you would in a real world scenario, now run when a hurricane open and that will open a Web browser with the APP. And here we have a new little Web apps called Bike Shop. You click on the name of a bike on, get a bit more details and even click the logo to get back to the home page. So it's people we've got this that lack running on will use this for the rest of the module . 29. Breaking the app: We're looking at trouble shooting errors in this module, so let's go ahead and introduce an ever so it's going to put it for indefinite index dot PHP. And here we can see we're taking the details off a particular bike by finding the i d. On returning that. But what if instead of doing this nice find, we just hard coded it to an I D. We know didn't exist. So we've got this. They have Jason and we can see we're gonna go eight bikes in there. So if we try and pull out bikes 12 then that should go pretty wrong. Let's go ahead and commit this just saying breaking me up. Perfect on. Let's go ahead and pushes up. Teoh. Roku given a minute to you Spin on, do its thing. Okay, Perfect. And then we can go back to the We're up here and again because it's just factually deployed . This refresh is going to take a second. There would be Oh, so we still go home paid the home page works fine, But now if we go into the bike details page, we just get internal serve ever. That's not very useful. How do We know what's going on when we need to look at the internal Hiroko logs. So let's do that in the next lesson. 30. Viewing the logs: we know our ups broken, but we don't know why. Because it's, ah production deployment. So it doesn't give us the every details. We can find some details by going to the command line on running Roku logs on that front dash, dash tail so that it continues to show us what's going on now for real fresher page, we can see we get this new log, and every time we hit refresh its following the logs on we can see here, we've got this bike not found exception, which is what we would expect because it's not gonna find a bikes gonna get undefined. It's gonna throw this every here. Okay, so that's what we broke. What can we do about that? Well, the first thing we probably want to do is roll back. What? We've rolled up production so we can fix this ever locally. So let's go ahead and do that in the next lesson. 31. Rolling back: one of the lovely things about Hirooka. Is it super easy to deploy its just get push? And it's also super easy to roll that aun said, a fixed era will literally. Egypt's going to say heroic rollback and Hiroki will do everything for us. So it won't roll, but everything in terms of handguns and conflict. But in terms of would you push something? We want to roll back to an earlier version of the code with just type Hiroko roll back on now for refresh this perfect. It's all working again, and we've gone back to the earlier version that we know that worked, and now we can fix the error locally and then push it up again. 32. Exploring the dashboard: We've already have a bit of a look at the Hiroki Dashboard, but let's explore it in a bit more detail. So this list, all the apse we've gotten weaken go into an app and this will give us an overview. It'll tell us what's happening. We have explored the resources tab a bit, and we've explored the settings a bit. But I'd really encourage you to just go in for the app we've already created on this course and just have a look through everything and have a bit of an explore and see how things work. And then we'll go into some of the most important or useful things in further lessons in this module. 33. Changing dyno type: one of the things you might notice is that these free Dino's these free virtual Web servers were using on her Roku. They go to sleep quite a lot, and in fact, many of the projects that we've done already have already gone to sleep because they what? That's just what they do on the free tier, and then they take a while to boot up. So if you then try and access, then you've got that annoying low time star on they need to sleep for, I think a minimum of eight hours a day so he can't run them continuously. So what happens if you go your upon to Roku and you're ready and you want to use it as a production website that runs all the time when we need to change our dino to a pay die now ? And to do this, we go into the app when we go to resources, and here we can hit change, Dina type, and most people for makes websites would just use hobby, so it's $7 a month and it will then run all the time. If you're a working on a bigger flat form, a bigger company and you want better performance than you want to go for the standard or performance. Dino's start from $25 a month, so it depends on what you need will depend on which one you select but sit just to run a basic website on even ah, kind of middle size e commerce stores and blog's and stuff. I've ruined on hobby diners before, and that worked fine, so you can select that that will then start charging a credit card, of course, pro rata for the month. But it means your website will be online the whole time. 34. Configuring SSL and domains: what happens if you want to configure things like domain Names On and SSL for So far, we've just been using these Roku app dot com sub domains, and that's fine. But if you've got a public website and you probably want about domain than that and you can do that by going into settings on def, we come down here. Here, we can configure SSL. It used to be you could only get SS ill on a pay plan. Syracuse a bit more liberal. Now you get it here already and you can just get by default. It will just create warn fear. Let's encrypt or Hiroko zones difficult authorization service now, I think. But if you want to upload a manual stiff, forget you can no real need to do that unless you're a big company that has one of the especially signed ones. We've like your own name in the little green bar here, but you can configure your SSL is you were here and then here in domains as well. If you got your own domain name, you can go to add and simply you put your demanding their click. Next, follow the process fruit on that will allow you to in your custom domain name on your Hiroko up 35. Final thoughts: Congratulations on making it to the end of this class on Heroku. You now know everything you need to know to get started. And if you've been coding along, you'll deploy your first South projects into the Heroku Cloud. Share your complete code with the class in the project section. If you've enjoyed the cost and please leave a review and whatever you're moving on to next, I wish you the best of luck and look forward to seeing you soon.