Introduction

Completed

As a developer for Tailwind Traders, an online retailer, you're tasked with building a new set of HTTP APIs for their platform using Node.js. Your primary goal is to construct an API that provides access to the product data.

Webpages are typically constructed using HTML, JavaScript, and CSS. Node.js offers a core module, HTTP, which facilitates the creation of a server to host web applications. This HTTP module supports various operations such as reading, writing, and handling different types of content.

While the HTTP module in Node.js is capable of using HTTP, it operates at a low level, making the process of building web applications somewhat slow. To expedite the development process, developers often use a higher-level framework like Express.js. Express.js utilizes the HTTP module internally but offers more efficient patterns for building a web server. For complex operations like authentication and authorization, a Node.js server framework is also used.

There are several web frameworks available for Node.js, including Hapi, Fastify, Koa, and Express. Express is widely used due to its longevity, well-designed APIs, and prompt security patches.

In this module, you'll learn how to handle HTTP requests with Node.js using the Express framework, a tool that simplifies the process of building websites and HTTP APIs.