WEBVTT 0 00:00.360 --> 00:04.130 All right guys. It's time again for yet another challenge. 1 00:04.140 --> 00:09.960 So in this challenge module we're going to take that blog website that we built in the previous EJS 2 00:09.960 --> 00:15.850 challenge module and we're going to upgrade it because one of the most annoying things about this web 3 00:15.850 --> 00:23.170 site is if we go ahead and compose say a new post, let's just take some lorem ipsum from over here 4 00:24.230 --> 00:27.190 and we just call it day 1, 5 00:27.230 --> 00:29.270 paste in the post hit publish. 6 00:29.270 --> 00:31.620 You can see it show up on our home page. 7 00:31.760 --> 00:40.820 But as soon as we restart our server or we make some changes in our app.js and we restart nodemon 8 00:41.510 --> 00:48.860 and we reload our app.js, then you can see that as soon as I hit refresh all of our data is gone. 9 00:49.100 --> 00:56.960 But in the last few modules we learnt all about data persistence using databases and using MongoDB 10 00:56.990 --> 00:58.370 and Mongoose. 11 00:58.910 --> 01:05.900 So it's time to test your metal and update this website so that we persist all of the data that we 12 01:05.900 --> 01:09.950 add through the compose route. 13 01:09.960 --> 01:16.200 Let me just go ahead and add yet another post in here and we're going to use MongoDB so that when 14 01:16.200 --> 01:26.530 we hit restart on our server or when we just simply end our session and restart nodemon and or we hit 15 01:26.620 --> 01:33.860 refresh, we should no longer be losing our data because it's now persisted using MongoDB. 16 01:33.880 --> 01:39.160 In addition we should still retain the same functionality, so we should still have an about us, 17 01:39.160 --> 01:43.390 a contact us and a home page. And also when we click on read more 18 01:43.450 --> 01:51.140 we should be directed now to the post website using the ID of that particular post document. 19 01:51.310 --> 01:57.970 And we're going to upgrade our Web site now using the power of databases. In the coming lessons I'll 20 01:57.970 --> 02:03.060 be guiding you through step by step the things that you'll need to do in order to achieve this. 21 02:03.220 --> 02:08.110 However if you really want to challenge yourself you've already seen what the end result needs to look 22 02:08.110 --> 02:08.600 like. 23 02:08.620 --> 02:13.060 You can simply just pause the video and try to implement all of this yourself. 24 02:13.210 --> 02:17.770 At the very end of the module you will be able to download the completed code and you can compare it 25 02:17.860 --> 02:18.770 against your own. 26 02:18.940 --> 02:24.970 Alternatively you can go through the guided challenge step by step and follow along and try to complete 27 02:24.970 --> 02:26.780 it one step at a time. 28 02:26.800 --> 02:28.090 It's completely up to you. 29 02:28.120 --> 02:31.080 But either way let's get started on this challenge.