1
00:00:00,120 --> 00:00:01,910
All right welcome back everyone.

2
00:00:02,010 --> 00:00:06,610
In the next few videos we're going to talk about deploying our express applications.

3
00:00:06,780 --> 00:00:12,120
Basically how do we get these apps that are currently running and they're working fine they're technically

4
00:00:12,120 --> 00:00:14,740
deployed using Cloud 9.

5
00:00:15,300 --> 00:00:21,960
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

6
00:00:21,960 --> 00:00:26,170
can send it to my friends I can post it on Facebook and people can visit that application.

7
00:00:26,400 --> 00:00:34,410
But of course it's not really the same thing as having my app server somewhere running 24/7 on an Amazon

8
00:00:34,410 --> 00:00:38,010
server or on a Heroku server or on my own server.

9
00:00:38,100 --> 00:00:41,490
Basically anything other than Cloud Nine servers.

10
00:00:41,490 --> 00:00:43,460
Not that there's anything wrong with Cloud 9.

11
00:00:43,470 --> 00:00:48,370
It's just that it's not designed for actually deploying applications.

12
00:00:48,480 --> 00:00:53,880
Those deployments that we've been doing when we start our server when we run node apps.

13
00:00:54,000 --> 00:00:59,350
Yes that starts up a server on cloud 9 and it works fine.

14
00:00:59,730 --> 00:01:06,480
But as soon as Cloud 9 has any issues as soon as I stop that server I hit control-C or my workspace

15
00:01:06,480 --> 00:01:09,240
restarts then we run into problems.

16
00:01:09,240 --> 00:01:12,240
That application is no longer running.

17
00:01:12,240 --> 00:01:18,660
The other problem is that it's generally not a good idea to have one copy of your application that you're

18
00:01:18,660 --> 00:01:24,930
working on that is the same copy of the application that is being deployed or that's being served.

19
00:01:25,230 --> 00:01:31,370
So let's say that you know I want to add in a new feature I wanted to add in.

20
00:01:31,860 --> 00:01:38,220
I don't know Google Maps or I want to add in something involving some sending a text message whatever

21
00:01:38,220 --> 00:01:42,710
feature it is I would need to stop the server to actually do that.

22
00:01:42,720 --> 00:01:48,300
So I'd have to stop my Yelp camp app try things out because remember we have to restart the server for

23
00:01:48,300 --> 00:01:50,320
a lot of these changes to take effect.

24
00:01:50,430 --> 00:01:55,870
So then we have gaps in our service where if I want to try something out I want to debug something.

25
00:01:56,160 --> 00:02:01,380
I'm actually debugging it on the same copy of the code that everyone else sees.

26
00:02:01,410 --> 00:02:03,010
Whoever is using the application.

27
00:02:03,210 --> 00:02:05,430
So obviously that's a big issue as well.

28
00:02:05,730 --> 00:02:12,720
So what we're going to do is use a tool called Heroku and Heroku is basically just servers that you're

29
00:02:12,720 --> 00:02:13,670
renting out.

30
00:02:13,950 --> 00:02:16,450
It's a company sales force owns them actually.

31
00:02:16,650 --> 00:02:21,460
There's a bunch of options similar companies like Digital Ocean.

32
00:02:21,630 --> 00:02:29,610
There's one called node jitsu modulus modulo that there's hundreds of these companies out there.

33
00:02:29,880 --> 00:02:35,040
Heroku is probably the most well-known though and the main reason we're using it is that it has an ice

34
00:02:35,040 --> 00:02:40,230
free plan but it's also really really robust and powerful.

35
00:02:40,440 --> 00:02:42,800
Big companies use Heroku all the time as well.

36
00:02:42,840 --> 00:02:45,930
So it's not just you know amateur solution or something.

37
00:02:46,470 --> 00:02:52,440
So let's talk about what Heroku is what it is what they do what deploying is when you deploy an application

38
00:02:52,740 --> 00:02:55,980
all that you're doing is running it on someone else's server.

39
00:02:56,010 --> 00:02:58,970
Or it can be your own server as well but just a server.

40
00:02:59,000 --> 00:02:59,720
That's it.

41
00:02:59,730 --> 00:03:04,160
It's it's running on a server somewhere and it's just going 24/7.

42
00:03:04,440 --> 00:03:10,860
What we could do is just get our own server go out build a computer connected to the Internet and just

43
00:03:10,860 --> 00:03:14,050
have that sitting in the corner running 24/7.

44
00:03:14,370 --> 00:03:18,840
Of course that doesn't really make sense for this course and it actually doesn't make sense for a lot

45
00:03:18,840 --> 00:03:20,410
of companies that used to be.

46
00:03:20,430 --> 00:03:24,440
And if the only way of serving an application of deploying something.

47
00:03:24,690 --> 00:03:32,400
And then there came this huge huge surge or this tidal wave of companies that provide you know deployment

48
00:03:32,430 --> 00:03:35,170
and cloud services as a service.

49
00:03:35,190 --> 00:03:43,470
Things like Amazon AWOS Heroku all the other things all the other companies I mentioned earlier there

50
00:03:43,520 --> 00:03:49,510
are businesses that solely exist basically to rent you computer power correct you server space.

51
00:03:49,560 --> 00:03:51,240
So that's that's what we're doing here.

52
00:03:51,300 --> 00:03:56,940
When we're going to deploy to Heroku all that we have to do is get our application whatever that application

53
00:03:56,940 --> 00:04:02,170
is you yup camp or our blog app we're just trying to get it on to Heroku servers and then just start

54
00:04:02,170 --> 00:04:04,270
it there and that's it.

55
00:04:04,380 --> 00:04:05,830
Heroku will give us a you.

56
00:04:05,880 --> 00:04:11,460
We can customize that we can send it to reroute to our own custom domain can do whatever we want but

57
00:04:11,460 --> 00:04:17,490
the goal is just to have our application that works on this computer or in this workspace in cloud 9

58
00:04:18,090 --> 00:04:23,220
and do exactly what we did here except on another computer another server.

59
00:04:23,340 --> 00:04:27,810
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

60
00:04:28,080 --> 00:04:32,720
a really simple simple application to route an express app yes.

61
00:04:32,910 --> 00:04:36,270
No database no mango no authentication none of that.

62
00:04:36,390 --> 00:04:38,380
And then I'll show you how to deploy Yelp camp.

63
00:04:38,400 --> 00:04:44,250
It is a little bit more complicated when you have to consider databases and security issues.

64
00:04:44,250 --> 00:04:46,190
So again we're going to start nice and simple.

65
00:04:46,380 --> 00:04:51,380
So in the next video we'll actually go about this process transferring code from this computer.

66
00:04:51,380 --> 00:04:56,310
This machine cloud 9 to HIEROCLES and making sure that it runs well and Heroku.

67
00:04:56,490 --> 00:05:02,730
And by the end of the next video you'll have a link that is actually deployed that you can share and

68
00:05:02,730 --> 00:05:04,550
that you don't have to worry about it going down
