Building, Optimizing, Hosting

8 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$99.99
List Price:  $139.99
You save:  $40
€92.11
List Price:  €128.95
You save:  €36.84
£79
List Price:  £110.60
You save:  £31.60
CA$135.63
List Price:  CA$189.89
You save:  CA$54.26
A$152.50
List Price:  A$213.51
You save:  A$61
S$134.36
List Price:  S$188.12
You save:  S$53.75
HK$782.24
List Price:  HK$1,095.17
You save:  HK$312.93
CHF 90.03
List Price:  CHF 126.05
You save:  CHF 36.01
NOK kr1,071.43
List Price:  NOK kr1,500.05
You save:  NOK kr428.61
DKK kr686.90
List Price:  DKK kr961.68
You save:  DKK kr274.78
NZ$165.89
List Price:  NZ$232.25
You save:  NZ$66.36
د.إ367.19
List Price:  د.إ514.08
You save:  د.إ146.89
৳10,962.37
List Price:  ৳15,347.75
You save:  ৳4,385.38
₹8,329.89
List Price:  ₹11,662.18
You save:  ₹3,332.29
RM471.95
List Price:  RM660.75
You save:  RM188.80
₦139,650.03
List Price:  ₦195,515.63
You save:  ₦55,865.60
₨27,784.55
List Price:  ₨38,899.49
You save:  ₨11,114.93
฿3,624.68
List Price:  ฿5,074.70
You save:  ฿1,450.02
₺3,219.22
List Price:  ₺4,507.05
You save:  ₺1,287.82
B$497.37
List Price:  B$696.33
You save:  B$198.96
R1,892.69
List Price:  R2,649.84
You save:  R757.15
Лв180.23
List Price:  Лв252.33
You save:  Лв72.09
₩133,970.85
List Price:  ₩187,564.55
You save:  ₩53,593.70
₪365.45
List Price:  ₪511.65
You save:  ₪146.19
₱5,625.38
List Price:  ₱7,875.76
You save:  ₱2,250.38
¥15,126.18
List Price:  ¥21,177.26
You save:  ¥6,051.08
MX$1,667.89
List Price:  MX$2,335.11
You save:  MX$667.22
QR364.33
List Price:  QR510.08
You save:  QR145.74
P1,371.04
List Price:  P1,919.52
You save:  P548.47
KSh13,198.68
List Price:  KSh18,478.68
You save:  KSh5,280
E£4,777.57
List Price:  E£6,688.79
You save:  E£1,911.22
ብር5,674.28
List Price:  ብር7,944.22
You save:  ብር2,269.94
Kz83,679.39
List Price:  Kz117,154.50
You save:  Kz33,475.10
CLP$97,728.22
List Price:  CLP$136,823.42
You save:  CLP$39,095.20
CN¥721.76
List Price:  CN¥1,010.50
You save:  CN¥288.73
RD$5,902.41
List Price:  RD$8,263.61
You save:  RD$2,361.20
DA13,448.48
List Price:  DA18,828.42
You save:  DA5,379.93
FJ$224.75
List Price:  FJ$314.66
You save:  FJ$89.91
Q779.03
List Price:  Q1,090.67
You save:  Q311.64
GY$20,896.29
List Price:  GY$29,255.65
You save:  GY$8,359.35
ISK kr13,751.62
List Price:  ISK kr19,252.82
You save:  ISK kr5,501.20
DH1,006.38
List Price:  DH1,408.98
You save:  DH402.59
L1,764.74
List Price:  L2,470.71
You save:  L705.96
ден5,675.43
List Price:  ден7,945.83
You save:  ден2,270.40
MOP$804.72
List Price:  MOP$1,126.64
You save:  MOP$321.92
N$1,894.31
List Price:  N$2,652.11
You save:  N$757.80
C$3,675.64
List Price:  C$5,146.05
You save:  C$1,470.40
रु13,325.57
List Price:  रु18,656.33
You save:  रु5,330.76
S/369.95
List Price:  S/517.94
You save:  S/147.99
K377.16
List Price:  K528.04
You save:  K150.88
SAR375.02
List Price:  SAR525.05
You save:  SAR150.02
ZK2,674.30
List Price:  ZK3,744.12
You save:  ZK1,069.82
L457.86
List Price:  L641.02
You save:  L183.16
Kč2,326.20
List Price:  Kč3,256.78
You save:  Kč930.57
Ft36,514.89
List Price:  Ft51,122.31
You save:  Ft14,607.42
SEK kr1,054.76
List Price:  SEK kr1,476.71
You save:  SEK kr421.94
ARS$85,616.43
List Price:  ARS$119,866.43
You save:  ARS$34,249.99
Bs690.20
List Price:  Bs966.32
You save:  Bs276.11
COP$388,387.97
List Price:  COP$543,758.70
You save:  COP$155,370.72
₡50,196.77
List Price:  ₡70,277.49
You save:  ₡20,080.71
L2,465.93
List Price:  L3,452.40
You save:  L986.47
₲734,141.46
List Price:  ₲1,027,827.41
You save:  ₲293,685.95
$U3,790.30
List Price:  $U5,306.57
You save:  $U1,516.27
zł397.21
List Price:  zł556.12
You save:  zł158.90
Already have an account? Log In

Transcript

Alrighty, so one last optimization we're going to make is in the meta tags, and we're going to add progressive web app support for iOS devices. I discovered that this was necessary when building my own portfolio website by using Xcode on a Mac computer. It allowed me to simulate any Apple device, and that's how I realized that it wasn't working properly. I found a medium article that explains the process. But again, we're just going to copy and paste this. You can read it if you want, I'll provide a link.

So we're going to go back into our index dot HTML. And we're going to comment out a title for our pw a compact and we'll paste this and we'll actually move the manifest down as well. To join it. And I also noticed I should probably have a space between the two words in my title. So let's fix that. Alright, so now we're actually ready to build and deploy.

So I like to have three terminals open at once. One is our local server. The other one would be GitHub. And then the other one is for building and deploying. So we can see that we have our first terminal open our local server, we're going to stop that with Ctrl plus C. So you can see we've stopped that now will help us optimize the time it takes to actually build our project. So if you remember we had our GitHub in our second one here, so we're going to make a third one.

And we're going to do this with the angular COI. We're going to run in ci build dash dash prod and then dash dash build dash optimizer and we're gonna run that this is going to output just a couple of files. into our distribution folder up here. So you can see that we have some warnings and some errors. So this is a new feature with the newer version of the angular CLR, you can see that we've exceeded the budget for our CSS file here in our app, and for our resume, and it gave us the same errors below. We can actually fix this by going into our Angular dot JSON file.

And so we will get rid of the terminal for now. And so from the top here, we're going to scroll down, you can see that we have budgets. And this is for a regular file. This is for any component style. So this is our CSS, we're going to make this 10 into a 100. So we don't want an error unless it's bigger than 100.

And we'll change our six into a 50. Okay, so now we can go back to our terminal and we're going to run the same thing. Again, just to make sure we don't have those same errors. Alrighty, so that finished properly that time with no warnings or errors. Now we already set up our Firebase account in the beginning. So we're just going to need to run one command to deploy our project and that is Firebase deploy.

These two commands will need to be run back to back anytime that you want to change to be live on your website. Now after it's finished, we're going to copy and paste our URL into our meta tag. Okay, so this is our hosting URL. We're just going to copy this and we're going to copy this into our meta tag, our o g URL here. This is for social media tags. Just though we have the same exact project that we're talking about.

Now that that's saved itself, we're going to actually do this process again. Okay, and we're going to deploy it one more time. But actually, before we check out our project, let's quickly test to make sure our Facebook and Twitter meta tags are working correctly. So we're going to go back into our second terminal, and we're going to ensure that everything is committed to our GitHub. So we're going to go get add, period, add everything, get commit, and then a message will be final version. And then we're going to push origin master Alright, so we previously copied our project URL, which we're going to need as well.

But now let's head over to Chrome. And you can see that I have the links here, I will share them in the course as well. And basically in both of them, you're just entering the URL of the page, and it'll give you some information. So we're going to paste that in there and press debug. Okay, it hasn't been shared on Facebook before, but we can click this button to fetch new information. So there are some warnings here, you can see that it doesn't have a picture yet, but we can scrape again.

And you can see now our picture loads here. So anytime that this is shared on Facebook, it will appear as this card here and it will have this thumbnail preview. Alright, very cool. Let's check out the Twitter one. It's a similar process. As I've said, we're just going to paste a link in there and we're preview the card.

Okay, cool. And also, we have our nice thumbnail here in the card. Awesome. So that's pretty much it. Now we can get back to taking a look at our project. And this time, we're going to control click on it and check it out.

Okay, OK, so you can see that we have our old, very original setup here. So we're going to go to inspect and we're going to empty cache and hard reload. And you can see now we have our proper project. This is a little bit messed up here. Okay, so we fixed that. All right, so let's, let's refund, go to lighthouse and see what our audit looks like.

Now. Let's run it. Okay, so you can see that our scores are even better. Our best practices is that 100 our SEO went up our PwC scores, this shows that it is our pw a we can also see that we have this plus sign here that proves that it's a pw a. And yeah, I'm very happy with how this project turned out. I hope you are too.

And let's do this for fun. We can install this on our desktop. And we can do that. So we have our full screen application here. Very cool. There we go.

Now it's loaded. Okay, our videos are good, awesome. So in the next video, I'm going to show you what the experience is like now on a mobile device because that's one of the main benefits of a pw a. But I think we've got a pretty cool project on our hands. I hope you're excited to share it with everyone and I'll see you in that next one. Bye for now.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.