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
€94.67
List Price:  €132.55
You save:  €37.87
£79.13
List Price:  £110.78
You save:  £31.65
CA$140.19
List Price:  CA$196.27
You save:  CA$56.08
A$153.90
List Price:  A$215.47
You save:  A$61.56
S$133.95
List Price:  S$187.54
You save:  S$53.58
HK$778.23
List Price:  HK$1,089.55
You save:  HK$311.32
CHF 88.29
List Price:  CHF 123.61
You save:  CHF 35.31
NOK kr1,103.93
List Price:  NOK kr1,545.55
You save:  NOK kr441.61
DKK kr706.23
List Price:  DKK kr988.76
You save:  DKK kr282.52
NZ$169.87
List Price:  NZ$237.82
You save:  NZ$67.95
د.إ367.25
List Price:  د.إ514.17
You save:  د.إ146.91
৳11,891.45
List Price:  ৳16,648.51
You save:  ৳4,757.05
₹8,441.95
List Price:  ₹11,819.06
You save:  ₹3,377.11
RM447.25
List Price:  RM626.17
You save:  RM178.92
₦166,762.32
List Price:  ₦233,473.92
You save:  ₦66,711.60
₨27,643.94
List Price:  ₨38,702.63
You save:  ₨11,058.68
฿3,455.42
List Price:  ฿4,837.72
You save:  ฿1,382.30
₺3,458.79
List Price:  ₺4,842.45
You save:  ₺1,383.65
B$580.06
List Price:  B$812.10
You save:  B$232.04
R1,807.38
List Price:  R2,530.41
You save:  R723.02
Лв185.40
List Price:  Лв259.56
You save:  Лв74.16
₩139,431.41
List Price:  ₩195,209.55
You save:  ₩55,778.14
₪373.90
List Price:  ₪523.47
You save:  ₪149.57
₱5,890.51
List Price:  ₱8,246.95
You save:  ₱2,356.43
¥15,375.85
List Price:  ¥21,526.80
You save:  ¥6,150.95
MX$2,023.49
List Price:  MX$2,832.97
You save:  MX$809.47
QR362.91
List Price:  QR508.09
You save:  QR145.18
P1,357.62
List Price:  P1,900.72
You save:  P543.10
KSh12,923.70
List Price:  KSh18,093.70
You save:  KSh5,170
E£4,953.11
List Price:  E£6,934.55
You save:  E£1,981.44
ብር12,318.34
List Price:  ብር17,246.17
You save:  ብር4,927.83
Kz91,240.87
List Price:  Kz127,740.87
You save:  Kz36,500
CLP$97,196.23
List Price:  CLP$136,078.61
You save:  CLP$38,882.38
CN¥723.96
List Price:  CN¥1,013.58
You save:  CN¥289.61
RD$5,995.75
List Price:  RD$8,394.29
You save:  RD$2,398.54
DA13,338.53
List Price:  DA18,674.48
You save:  DA5,335.94
FJ$226.94
List Price:  FJ$317.73
You save:  FJ$90.78
Q768.81
List Price:  Q1,076.37
You save:  Q307.55
GY$20,819.01
List Price:  GY$29,147.45
You save:  GY$8,328.43
ISK kr13,756.62
List Price:  ISK kr19,259.82
You save:  ISK kr5,503.20
DH996.34
List Price:  DH1,394.91
You save:  DH398.57
L1,817.34
List Price:  L2,544.35
You save:  L727.01
ден5,825.76
List Price:  ден8,156.30
You save:  ден2,330.54
MOP$797.89
List Price:  MOP$1,117.08
You save:  MOP$319.18
N$1,802.21
List Price:  N$2,523.16
You save:  N$720.95
C$3,662.39
List Price:  C$5,127.50
You save:  C$1,465.10
रु13,434.94
List Price:  रु18,809.46
You save:  रु5,374.51
S/378.24
List Price:  S/529.55
You save:  S/151.31
K400.31
List Price:  K560.45
You save:  K160.14
SAR375.36
List Price:  SAR525.52
You save:  SAR150.16
ZK2,744.04
List Price:  ZK3,841.77
You save:  ZK1,097.72
L471.18
List Price:  L659.67
You save:  L188.49
Kč2,396.54
List Price:  Kč3,355.25
You save:  Kč958.71
Ft38,535.91
List Price:  Ft53,951.82
You save:  Ft15,415.90
SEK kr1,097.18
List Price:  SEK kr1,536.10
You save:  SEK kr438.91
ARS$99,841.85
List Price:  ARS$139,782.59
You save:  ARS$39,940.73
Bs687.64
List Price:  Bs962.72
You save:  Bs275.08
COP$442,190.80
List Price:  COP$619,084.81
You save:  COP$176,894.01
₡50,678.85
List Price:  ₡70,952.42
You save:  ₡20,273.57
L2,513.64
List Price:  L3,519.20
You save:  L1,005.56
₲775,611.66
List Price:  ₲1,085,887.35
You save:  ₲310,275.69
$U4,292.93
List Price:  $U6,010.28
You save:  $U1,717.34
zł409.79
List Price:  zł573.73
You save:  zł163.93
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.