Handle the information from the browser. In this blog, we will go through the process of creating an API endpoint and access to them from the browser and send a response based on the information we received.
What is the scope of this blog?
In this blog, we will go through the process of creating an API endpoint and access to them from the browser and send a response based on the information we received.
In this first part, we will explain how the info is sent from the browser using the Query string and how the server can access this info and used them.
In the second part, we will see how the sever accessing this info can use them to send a response to the browser to display info on the screen to the user.
When it comes to the server, and client-side one of the most complex and fascinating part is how does two communicate with each other and requesting and sending information.
The first step is that the browser communicates with the server and passing along some information. The server needs to collect this informations and use them to generate a response to fire back to the browser, which will display this information on the screen for the user. To be able to do that we need to learn how to create your HTTP JSON endpoint using Express.
How the browser sends info to the server?
Our first challenge is to be able and understand how the browser sends info to the server. To do this, we will use the Query string, which is an extension of the URL that provides additional value to pass along with the request.
Let’s build an example of info sent with a Query string to the server. In our code environment, we need to create an endpoint for products.
The main goal of this blog is to explain the “Architecture of Nodejs” and to know how the Nodejs works behind the scenes. Generally, most of the server-side languages, like PHP, ASP.NET, Ruby, and including Nodejs follows multi-threaded architecture. That means for each client-side request initiates a new thread or even a new process.
Looking to build dynamic, extensively featured, and full-fledged web applications? **[Hire NodeJs Developer](https://hourlydeveloper.io/hire-dedicated-node-js-developer/ "Hire NodeJs Developer")** to create a real-time, faster, and scalable...