Introduction

Completed

Node.js Web APIs enable all your applications to be reachable by anyone who's using a browser or HTTP-capable client software. The various routes available in your API enable more capabilities for these users.

In this module, you're a developer for an online retailer. The retailer is creating a new set of HTTP APIs for its application. The application is built on Node.js. Your job is to create an API that lists the products that the retailer sells. The API will let applications work with the product data.

Although Node.js has some core capabilities via the HTTP module to create an API, many web frameworks simplify this setup. In particular, Express is used by many developers and has been around for a long time. You can use it to focus on creating the necessary routes to support your applications.

In this module, you'll learn how to create API routes with Node.js and Express by using JavaScript. You'll also learn about the parts of URLs, the components of a route, and how they all work.

Learning objectives

By the end of this module, you'll be able to:

  • Understand API route management
  • Implement route handling in a Node.js application with JavaScript

Prerequisites

  • Git and Node.js installed on your computer
  • Familiarity with editing text and code files in any text editor
  • Basic familiarity with HTTP
  • Experience using the command line, including Git operations