All right guys. It's time again for yet another challenge.
So in this challenge module we're going to take that blog website that we built in the previous EJS
challenge module and we're going to upgrade it because one of the most annoying things about this web
site is if we go ahead and compose say a new post, let's just take some lorem ipsum from over here
and we just call it day 1,
paste in the post hit publish.
You can see it show up on our home page.
But as soon as we restart our server or we make some changes in our app.js and we restart nodemon
and we reload our app.js, then you can see that as soon as I hit refresh all of our data is gone.
But in the last few modules we learnt all about data persistence using databases and using MongoDB
and Mongoose.
So it's time to test your metal and update this website so that we persist all of the data that we
add through the compose route.
Let me just go ahead and add yet another post in here and we're going to use MongoDB so that when
we hit restart on our server or when we just simply end our session and restart nodemon and or we hit
refresh, we should no longer be losing our data because it's now persisted using MongoDB.
In addition we should still retain the same functionality, so we should still have an about us,
a contact us and a home page. And also when we click on read more
we should be directed now to the post website using the ID of that particular post document.
And we're going to upgrade our Web site now using the power of databases. In the coming lessons I'll
be guiding you through step by step the things that you'll need to do in order to achieve this.
However if you really want to challenge yourself you've already seen what the end result needs to look
like.
You can simply just pause the video and try to implement all of this yourself.
At the very end of the module you will be able to download the completed code and you can compare it
against your own.
Alternatively you can go through the guided challenge step by step and follow along and try to complete
it one step at a time.
It's completely up to you.
But either way let's get started on this challenge.