Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:02,290 --> 00:00:06,150
So how do you deploy our React application?
2
00:00:06,150 --> 00:00:09,640
How do you push it onto a real server?
3
00:00:09,640 --> 00:00:12,240
There are a couple of steps involved,
4
00:00:12,240 --> 00:00:15,110
which you can go through whenever you deploy
5
00:00:15,110 --> 00:00:18,400
or redeploy your application.
6
00:00:18,400 --> 00:00:21,340
It all starts with writing your code, of course,
7
00:00:21,340 --> 00:00:23,840
and then with testing your code.
8
00:00:23,840 --> 00:00:25,820
And this might sound obvious
9
00:00:25,820 --> 00:00:29,510
but of course you wanna thoroughly test your application
10
00:00:29,510 --> 00:00:31,230
before you deploy it.
11
00:00:31,230 --> 00:00:33,310
You wanna play around with it,
12
00:00:33,310 --> 00:00:35,340
test different things,
13
00:00:35,340 --> 00:00:38,270
see if you handle errors correctly,
14
00:00:38,270 --> 00:00:39,470
things like that.
15
00:00:39,470 --> 00:00:42,710
You wanna make sure that you're shipping an application
16
00:00:42,710 --> 00:00:44,463
which is ready to be used.
17
00:00:45,310 --> 00:00:47,000
Then, as a next step,
18
00:00:47,000 --> 00:00:51,160
you might wanna explore optimization opportunities.
19
00:00:51,160 --> 00:00:53,980
There are certain things in your code
20
00:00:53,980 --> 00:00:55,430
which you can optimize,
21
00:00:55,430 --> 00:00:56,730
most importantly,
22
00:00:56,730 --> 00:01:00,400
you might wanna look into a concept called lazy loading.
23
00:01:00,400 --> 00:01:02,840
And we are going to explore this concept
24
00:01:02,840 --> 00:01:05,140
in this course section.
25
00:01:05,140 --> 00:01:07,400
So that is another important part
26
00:01:07,400 --> 00:01:10,970
before you actually move your code somewhere,
27
00:01:10,970 --> 00:01:12,033
optimize it.
28
00:01:13,590 --> 00:01:15,840
Now once you're happy with your code,
29
00:01:15,840 --> 00:01:17,960
it's optimized and it's working,
30
00:01:17,960 --> 00:01:21,970
then it's time to build your app for production.
31
00:01:21,970 --> 00:01:24,650
And with build, I don't mean
32
00:01:24,650 --> 00:01:26,880
that you need to write more code,
33
00:01:26,880 --> 00:01:29,650
but instead, we will execute a script
34
00:01:29,650 --> 00:01:31,990
which was written for us already,
35
00:01:31,990 --> 00:01:35,260
which is part of this React project we worked with
36
00:01:35,260 --> 00:01:37,100
throughout this course,
37
00:01:37,100 --> 00:01:42,070
a script which will then output a production ready bundle
38
00:01:42,070 --> 00:01:43,170
of our code,
39
00:01:43,170 --> 00:01:46,450
which is minified and automatically optimized
40
00:01:46,450 --> 00:01:49,580
to be as small as possible,
41
00:01:49,580 --> 00:01:51,540
so that we get an output there,
42
00:01:51,540 --> 00:01:53,520
which we can take like that
43
00:01:53,520 --> 00:01:55,800
and move on to a server,
44
00:01:55,800 --> 00:01:58,970
and will then automatically serve our users
45
00:01:58,970 --> 00:02:02,190
a highly optimized code package
46
00:02:02,190 --> 00:02:04,610
which is as small as possible,
47
00:02:04,610 --> 00:02:05,840
which of course matters,
48
00:02:05,840 --> 00:02:09,050
because we wanna ship as little code as possible
49
00:02:09,050 --> 00:02:10,360
to our users,
50
00:02:10,360 --> 00:02:13,880
because they will only be able to interact with our website
51
00:02:13,880 --> 00:02:15,440
once it's fully loaded.
52
00:02:15,440 --> 00:02:18,950
So shipping less code will load the app faster
53
00:02:18,950 --> 00:02:20,750
and therefore is better,
54
00:02:20,750 --> 00:02:23,260
and will be able to automatically generate
55
00:02:23,260 --> 00:02:28,150
such a optimized minified code bundle with a certain script
56
00:02:28,150 --> 00:02:31,130
which we are also going to see in action
57
00:02:31,130 --> 00:02:33,200
in this course section.
58
00:02:33,200 --> 00:02:36,110
Now, once we got this optimized code package
59
00:02:36,110 --> 00:02:38,230
which is ready for deployment,
60
00:02:38,230 --> 00:02:40,390
we need to deploy that package.
61
00:02:40,390 --> 00:02:43,750
And therefore, the next step is that we take that code
62
00:02:43,750 --> 00:02:45,700
which is produced for us,
63
00:02:45,700 --> 00:02:48,630
which is based on the code we wrote of course,
64
00:02:48,630 --> 00:02:51,620
and uploaded to a server.
65
00:02:51,620 --> 00:02:53,960
Now, there will have different choices,
66
00:02:53,960 --> 00:02:56,610
different hosting providers which we can use.
67
00:02:56,610 --> 00:02:59,440
And I'll show you an example in this course section.
68
00:02:59,440 --> 00:03:01,750
But you can really deploy anywhere.
69
00:03:01,750 --> 00:03:03,640
I'll just leave a couple of notes
70
00:03:03,640 --> 00:03:05,280
on what matters there
71
00:03:05,280 --> 00:03:06,800
and what you should keep in mind
72
00:03:06,800 --> 00:03:09,760
when it comes to deploying your application.
73
00:03:09,760 --> 00:03:13,610
You will definitely need to configure your server
74
00:03:13,610 --> 00:03:16,740
or your hosting provider's offering.
75
00:03:16,740 --> 00:03:19,160
And I'll dive into this configuration
76
00:03:19,160 --> 00:03:22,070
together with you in this course section
77
00:03:22,070 --> 00:03:25,840
to make it crystal clear what matters here,
78
00:03:25,840 --> 00:03:27,640
what you should pay attention to,
79
00:03:27,640 --> 00:03:29,400
and how you do configure
80
00:03:29,400 --> 00:03:33,433
and ultimately deploy your code and your server correctly.
5955
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.