Express.js Mastery / Express: Letโ€™s Start Building The Natours API!

Installing Postman

๐Ÿ“– What Is Postman?

  • A tool used for API testing.

  • Works a bit like a browser, but instead of rendering HTML/webpages, it lets you send all kinds of requests and view the raw response (usually as text/JSON) to work with.

  • The standard tool used by developers for testing APIs.

It simplifies API development โ€” beyond just testing, it has many other useful features covered later in the course.


๐Ÿ’ป Installing Postman

  • ๐ŸŒ Go to postman.com

  • ๐Ÿ“‚ Navigate to Product โ†’ Postman.

  • โฌ‡๏ธ Click Download the app.


โš™๏ธ How Postman Works

  • Similar to a browser's URL bar โ€” you enter a URL and send a request.

๐Ÿ”‘ Key difference from a browser:

In a browser's address bar, every request is automatically a GET request. In Postman, you can freely choose the HTTP method: GET, POST, PUT, PATCH, etc.

๐Ÿงช Quick Test Example

  1. Set the method to GET.

  2. Enter a URL โ€” e.g. the Dog API endpoint dog.ceo

  3. Click Send.

  4. The JSON response appears below โ€” matching what the same request would return in a browser.


๐Ÿ› ๏ธ Other Postman Features (used throughout the course)

  • ๐Ÿ’พ Save requests and organize them into collections and folders.

  • โœ… Run automated tests against APIs.

  • ๐ŸŒ Set up environments โ€” e.g. separate development vs. production configs.

  • ๐Ÿ“ฆ Send data in the request body โ€” useful for POST / PATCH requests.

  • ๐Ÿท๏ธ Set custom headers.

  • ๐Ÿš€ General all-purpose tooling for building and testing APIs.


โœ… Key Takeaway

  • ๐Ÿ“ฎ From this point in the course onward, Postman will be the go-to tool for sending requests to and testing the custom API being built with Express.