Think new features to our projects, I would like to introduce a very basic concept that we need in order to go. This is the concept of promise that is defined as an object representing the event or completion or failure of an a synchronous operation. We are not going to cover promises here in this course. But before going on, please be sure to refresh your memory on promises following the Mozilla guide using promises. We are working with a study list of articles but of course the articles should be in a database. So we are using promises anyway, visited this assumption.
Until now, we had this list of articles to perform some operations but to perform more advanced tasks, we create an article class whose constructive problem Refer the current articles definition and that is some useful method. According to this new object, we are going to change the articles list in order to use our objects that will reflect the previous articles list. If you want to perform some basic operations over this list right now, we have to use a related operations and basic checks over the single article keys. But what if Li there our list of articles will be moved to a database, we will have to find every place in which the list was parse it and modify the code according to the new database. So we will introduce a class that will hide the separations. So we will just call methods without caring about the delay mode to store articles before doing that, Have to see how to retrieve get parameters from HTTP requests.
Express defines route params. Route parameters are named URLs segments that are used to capture the values specified or their position in the URL. In our case, we will need to retrieve the article id to show a specific article details. So we will use the app dot get slash articles slash article id. And we will retrieve this using the req dot params dot article id