Server Review

Introduction

Before diving into a new technology like Express.js, it's important to take a step back and understand the broader landscape of web development. Think of this as studying the map before embarking on a journey—knowing the terrain will help you navigate better.

What You'll Learn

Client-side vs. Server-side Applications

In the world of web development, the "client" and the "server" are like two halves of a conversation. The client (e.g., your browser or mobile app) is the one asking questions, while the server is the one providing answers.

Client-side Applications

A client-side application is like the user interface of a machine—it's what you see and interact with. For example, a website built with HTML, CSS, and JavaScript is a client-side application. It runs directly on your device, whether it's a laptop, phone, or tablet.

Analogy: Imagine a vending machine. The buttons and the display are like the client-side application—what you see and use to make a selection.

Example: A weather app on your phone showing sunny or rainy icons is the client-side interface. It fetches data from a server to update the display.

Server-side Applications

Server-side applications are the unseen engines driving the client-side experience. They run on powerful computers—often in data centers—handling tasks like retrieving data, processing it, and sending it back to the client.

Analogy: In the vending machine example, the inner machinery fetching your selected snack is like the server-side application.

Example: When you log into a website, the server-side application validates your credentials against a database and sends back a response indicating whether access is granted.

Using Postman

Postman is a desktop tool that acts as a browser for server-side applications. Instead of visually browsing websites, you can test and explore APIs (Application Programming Interfaces) with it.

Think of Postman as a universal remote control for APIs. With it, you can send requests to a server (e.g., "What data do you have about weather in New York?") and receive responses in return.

Steps to Use Postman

  1. Ensure you have Postman installed. You can download it from the official Postman site.
  2. Open Postman and create a new request.
  3. Set the method to GET.
  4. Enter the URL: https://api.publicapis.org/entries.
  5. Send the request and observe the response—a JSON object with a list of public APIs!

Common Scenarios

Here are some scenarios where Postman proves invaluable:

What You've Reviewed

In this lesson, you've revisited key web development concepts:

With this foundational knowledge, you're ready to explore server-side frameworks like Express.js and beyond!