1 00:00:00,210 --> 00:00:07,790 In this portrait, we are going to use the express look, Jess, and also Mongo DB to create this project. 2 00:00:08,550 --> 00:00:16,950 But what is expressed as expressed, as you say, back and application framework for the nucleus and 3 00:00:16,950 --> 00:00:24,960 this framework is this idea for making developing websites and apps or API much easier. 4 00:00:25,590 --> 00:00:28,680 And if you look at this Web page, you can see it. 5 00:00:28,680 --> 00:00:35,840 There are a comparison with the program that use doctorate's only and the other is the nucleus with 6 00:00:35,850 --> 00:00:37,120 Express Guess. 7 00:00:37,140 --> 00:00:43,890 And as you can see that in the right hand side, it's much cleaner and is easier to maintain and more 8 00:00:43,890 --> 00:00:44,440 readable. 9 00:00:44,640 --> 00:00:51,900 So now we come back to our project and since we are going to use to express that, so we have to follow 10 00:00:51,900 --> 00:00:55,020 these instruction so we already create a photo. 11 00:00:55,020 --> 00:00:57,510 So we just need to use APM in it. 12 00:00:58,500 --> 00:00:59,700 So we are patient here. 13 00:00:59,700 --> 00:01:02,280 We have hyphen and why now? 14 00:01:02,430 --> 00:01:06,420 We create a project and then we are going to install the Express. 15 00:01:07,110 --> 00:01:08,130 So we copy this. 16 00:01:09,300 --> 00:01:11,100 And here. 17 00:01:12,170 --> 00:01:18,920 Now, you can see inside the cage that Jason, you have to express here, so next time when you use 18 00:01:18,920 --> 00:01:22,760 NPM, install it, install the express automatically. 19 00:01:23,000 --> 00:01:30,950 And by the way, if you do not have to NPM command, you have to install the AC at all. 20 00:01:31,460 --> 00:01:38,410 Now, we are going to create an app not just at NASA and inside here. 21 00:01:38,540 --> 00:01:46,910 We are going to use the Express by typing constant express and require express. 22 00:01:47,900 --> 00:01:55,990 And then we have the constant app is equal to express and then we are going to listen to a 3000 number. 23 00:01:56,150 --> 00:02:04,580 And this mean if we want to assess this app, we have to use the local host and with the port free thousands. 24 00:02:05,060 --> 00:02:09,410 But we can't access this site yet because we haven't stopped the server. 25 00:02:09,680 --> 00:02:16,400 And also we have to add the routing so that it can return something if we go to the website. 26 00:02:16,700 --> 00:02:28,160 So we have the app looked at and and then request and respond and then we are going to use that respond 27 00:02:28,340 --> 00:02:33,580 to send and we have the paragraph and we type homepage. 28 00:02:33,950 --> 00:02:39,250 Now we are going to start the server by using the Bond app. 29 00:02:39,860 --> 00:02:49,340 And also if you haven't got the money, you have to type NPM install and then bash G and then don't 30 00:02:49,340 --> 00:02:52,010 want to installed the note mod. 31 00:02:52,890 --> 00:02:56,220 And now we are going to start Safaa with not Maun. 32 00:02:58,230 --> 00:03:00,300 Now, if you go to the Web site again. 33 00:03:01,520 --> 00:03:05,720 You can see the homepage, there's two of us we turned. 34 00:03:06,950 --> 00:03:14,450 It is because we have this hand on, which means there is just a and which means there is just a little 35 00:03:14,870 --> 00:03:17,330 after this you are El. 36 00:03:18,330 --> 00:03:26,220 And if we want to go to another page, for example, later we will have a at item page. 37 00:03:26,400 --> 00:03:34,080 So we want to add they wrote about an item and then we put a request and response. 38 00:03:34,860 --> 00:03:42,090 And this time we are going to send a header with that items. 39 00:03:42,420 --> 00:03:50,250 So now if we type at item, you can see these headers and items here. 40 00:03:50,490 --> 00:03:54,710 So now you can see how to return different page with different route. 41 00:03:55,020 --> 00:04:00,070 And of course, this is not a good way to return the XHTML code. 42 00:04:00,450 --> 00:04:04,400 So in the next part, we are going to do it in another way.