What is server in web?

Jake jonggu baek
2 min readApr 20, 2023

What is a server on the web? A server is meant to ‘serve’ you something. It’s similar to going to a restaurant and ordering something from your server, then receiving what you ordered. The same process occurs when you type words into the Google search bar and click the ‘Search’ button. As soon as you click the button, the server takes the words from the search bar and provides you with information related to your input.

Okay, so if a web server is like a restaurant server, what do server developers do? They create manuals for the server on how to respond to client orders. Therefore, the code written by server developers looks something like this: ‘When a user enters www.google.com, show them the Google index page.’ ‘When a user clicks the search button, show them the results page with what they typed.’

— We can call these patterns ‘Request & Response.’ —

So can the web server give you anything you REQUEST? No, the server can only handle four types of orders (requests): GET, POST, PUT, and DELETE. Here are some examples of these types:

  • GET: When you want to watch a fun video, you search for something on YouTube.
  • POST: When you want to reply to a video.
  • PUT: When you want to edit your previous reply.
  • DELETE: When you want to remove your reply. Let’s write some JavaScript code for this next time.

We will make a small and simple web server in the next story.

--

--