All right welcome back everyone.
In the next few videos we're going to talk about deploying our express applications.
Basically how do we get these apps that are currently running and they're working fine they're technically
deployed using Cloud 9.
We have a few RL You know when my camp server is running I have a U R L that I can send to my mom I
can send it to my friends I can post it on Facebook and people can visit that application.
But of course it's not really the same thing as having my app server somewhere running 24/7 on an Amazon
server or on a Heroku server or on my own server.
Basically anything other than Cloud Nine servers.
Not that there's anything wrong with Cloud 9.
It's just that it's not designed for actually deploying applications.
Those deployments that we've been doing when we start our server when we run node apps.
Yes that starts up a server on cloud 9 and it works fine.
But as soon as Cloud 9 has any issues as soon as I stop that server I hit control-C or my workspace
restarts then we run into problems.
That application is no longer running.
The other problem is that it's generally not a good idea to have one copy of your application that you're
working on that is the same copy of the application that is being deployed or that's being served.
So let's say that you know I want to add in a new feature I wanted to add in.
I don't know Google Maps or I want to add in something involving some sending a text message whatever
feature it is I would need to stop the server to actually do that.
So I'd have to stop my Yelp camp app try things out because remember we have to restart the server for
a lot of these changes to take effect.
So then we have gaps in our service where if I want to try something out I want to debug something.
I'm actually debugging it on the same copy of the code that everyone else sees.
Whoever is using the application.
So obviously that's a big issue as well.
So what we're going to do is use a tool called Heroku and Heroku is basically just servers that you're
renting out.
It's a company sales force owns them actually.
There's a bunch of options similar companies like Digital Ocean.
There's one called node jitsu modulus modulo that there's hundreds of these companies out there.
Heroku is probably the most well-known though and the main reason we're using it is that it has an ice
free plan but it's also really really robust and powerful.
Big companies use Heroku all the time as well.
So it's not just you know amateur solution or something.
So let's talk about what Heroku is what it is what they do what deploying is when you deploy an application
all that you're doing is running it on someone else's server.
Or it can be your own server as well but just a server.
That's it.
It's it's running on a server somewhere and it's just going 24/7.
What we could do is just get our own server go out build a computer connected to the Internet and just
have that sitting in the corner running 24/7.
Of course that doesn't really make sense for this course and it actually doesn't make sense for a lot
of companies that used to be.
And if the only way of serving an application of deploying something.
And then there came this huge huge surge or this tidal wave of companies that provide you know deployment
and cloud services as a service.
Things like Amazon AWOS Heroku all the other things all the other companies I mentioned earlier there
are businesses that solely exist basically to rent you computer power correct you server space.
So that's that's what we're doing here.
When we're going to deploy to Heroku all that we have to do is get our application whatever that application
is you yup camp or our blog app we're just trying to get it on to Heroku servers and then just start
it there and that's it.
Heroku will give us a you.
We can customize that we can send it to reroute to our own custom domain can do whatever we want but
the goal is just to have our application that works on this computer or in this workspace in cloud 9
and do exactly what we did here except on another computer another server.
So we're going to do that in the next few videos in the next video we're going to show you how to deploy
a really simple simple application to route an express app yes.
No database no mango no authentication none of that.
And then I'll show you how to deploy Yelp camp.
It is a little bit more complicated when you have to consider databases and security issues.
So again we're going to start nice and simple.
So in the next video we'll actually go about this process transferring code from this computer.
This machine cloud 9 to HIEROCLES and making sure that it runs well and Heroku.
And by the end of the next video you'll have a link that is actually deployed that you can share and
that you don't have to worry about it going down