In the previous lesson, we have seen how to structure get an A post request using an express application, it's time to write our own first request. So let's use what we saw in the previous lesson. So we are going to use the get function, we will use the root URL and we will use the rest response object dot JSON with that whole string. Now we launch our server node do so node index the GS sorry, and we use curl to perform a very simple GET request on the port 5000. As you can see, we have the whole string. Now let's try to reply with a with an object.
So we will going to create static list of articles that I will copy and paste in the constants directory. So we create the articles.js file and sorry and then we are going to paste this list of articles with all the attributes that you can see in the code in the references and we are going to import this list in our index.gs so require constants articles and we are going to create a new get the article send point request response next and we are going to use again rest dot JSON and we will pass the list of articles. Let's see if everything works correctly. So we are going to terminate the previous Note the process and we started again with the new code and we perform a new car requests and it works fine