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
€95.85
List Price:  €134.19
You save:  €38.34
£79.54
List Price:  £111.35
You save:  £31.81
CA$143.73
List Price:  CA$201.23
You save:  CA$57.50
A$159.93
List Price:  A$223.91
You save:  A$63.97
S$135.54
List Price:  S$189.77
You save:  S$54.22
HK$777.83
List Price:  HK$1,089
You save:  HK$311.16
CHF 89.34
List Price:  CHF 125.09
You save:  CHF 35.74
NOK kr1,131.88
List Price:  NOK kr1,584.68
You save:  NOK kr452.80
DKK kr715.08
List Price:  DKK kr1,001.15
You save:  DKK kr286.06
NZ$176.75
List Price:  NZ$247.46
You save:  NZ$70.70
د.إ367.26
List Price:  د.إ514.18
You save:  د.إ146.92
৳11,945.33
List Price:  ৳16,723.94
You save:  ৳4,778.61
₹8,493.77
List Price:  ₹11,891.62
You save:  ₹3,397.85
RM450.75
List Price:  RM631.07
You save:  RM180.32
₦154,938.50
List Price:  ₦216,920.10
You save:  ₦61,981.60
₨27,824.38
List Price:  ₨38,955.25
You save:  ₨11,130.86
฿3,419.79
List Price:  ฿4,787.84
You save:  ฿1,368.05
₺3,519.01
List Price:  ₺4,926.76
You save:  ₺1,407.74
B$608.53
List Price:  B$851.97
You save:  B$243.44
R1,830.80
List Price:  R2,563.19
You save:  R732.39
Лв187.32
List Price:  Лв262.25
You save:  Лв74.93
₩144,627.53
List Price:  ₩202,484.33
You save:  ₩57,856.80
₪365.39
List Price:  ₪511.57
You save:  ₪146.17
₱5,882.91
List Price:  ₱8,236.31
You save:  ₱2,353.40
¥15,643.93
List Price:  ¥21,902.13
You save:  ¥6,258.20
MX$2,007.58
List Price:  MX$2,810.70
You save:  MX$803.11
QR364.41
List Price:  QR510.19
You save:  QR145.78
P1,381.63
List Price:  P1,934.33
You save:  P552.70
KSh12,923.70
List Price:  KSh18,093.70
You save:  KSh5,170
E£5,087.81
List Price:  E£7,123.14
You save:  E£2,035.32
ብር12,764.56
List Price:  ብር17,870.89
You save:  ብር5,106.33
Kz91,790.82
List Price:  Kz128,510.82
You save:  Kz36,720
CLP$98,905.10
List Price:  CLP$138,471.10
You save:  CLP$39,566
CN¥729.56
List Price:  CN¥1,021.42
You save:  CN¥291.85
RD$6,087.13
List Price:  RD$8,522.23
You save:  RD$2,435.09
DA13,485.25
List Price:  DA18,879.89
You save:  DA5,394.64
FJ$231.62
List Price:  FJ$324.28
You save:  FJ$92.66
Q770.23
List Price:  Q1,078.35
You save:  Q308.12
GY$20,913.67
List Price:  GY$29,279.97
You save:  GY$8,366.30
ISK kr13,911.60
List Price:  ISK kr19,476.80
You save:  ISK kr5,565.20
DH1,006.07
List Price:  DH1,408.53
You save:  DH402.46
L1,836.70
List Price:  L2,571.46
You save:  L734.75
ден5,900.06
List Price:  ден8,260.33
You save:  ден2,360.26
MOP$800.26
List Price:  MOP$1,120.39
You save:  MOP$320.13
N$1,840.36
List Price:  N$2,576.58
You save:  N$736.22
C$3,678.42
List Price:  C$5,149.94
You save:  C$1,471.51
रु13,597.49
List Price:  रु19,037.04
You save:  रु5,439.54
S/372.23
List Price:  S/521.13
You save:  S/148.90
K405.36
List Price:  K567.52
You save:  K162.16
SAR375.62
List Price:  SAR525.88
You save:  SAR150.26
ZK2,766.46
List Price:  ZK3,873.15
You save:  ZK1,106.69
L477.10
List Price:  L667.96
You save:  L190.86
Kč2,408.98
List Price:  Kč3,372.68
You save:  Kč963.69
Ft39,689.03
List Price:  Ft55,566.23
You save:  Ft15,877.20
SEK kr1,103.13
List Price:  SEK kr1,544.43
You save:  SEK kr441.30
ARS$102,160.40
List Price:  ARS$143,028.65
You save:  ARS$40,868.24
Bs690.76
List Price:  Bs967.10
You save:  Bs276.33
COP$435,928.80
List Price:  COP$610,317.76
You save:  COP$174,388.96
₡50,434.81
List Price:  ₡70,610.75
You save:  ₡20,175.94
L2,537.51
List Price:  L3,552.62
You save:  L1,015.10
₲779,455.88
List Price:  ₲1,091,269.42
You save:  ₲311,813.53
$U4,474.38
List Price:  $U6,264.31
You save:  $U1,789.93
zł408.66
List Price:  zł572.14
You save:  zł163.48
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.