Introduction
Use the web as a platform to run your application. This platform lets anyone reach your application by using a browser, client, or software that speaks HTTP.
In this module, you're a developer for an online retailer. The retailer is building a new set of HTTP APIs for their application. The application is built on Node.js. Your job is to build an API that lists the products they sell. The API you build lets applications work with the product data.
You can construct a webpage by using HTML pages, JavaScript, and CSS. Node.js has a core module called HTTP that helps you construct web applications. It supports requests for reading, writing, and working with different types of content.
Even though the HTTP module in Node.js is capable, it's not as fast as using a framework. To build an efficient API that can handle complex operations like authentication and authorization, you'll also use a framework.
There are many web frameworks for Node.js, such as Hapi, Fastify, Koa, and Express. Express is used by many developers. It's been around for a long time. The APIs are well thought out, security issues are patched, and so on.
In this module, you'll learn how to handle HTTP requests with Node.js. You'll also learn about the Express framework, which helps you build websites and HTTP APIs.
Learning objectives
By the end of this module, you'll be able to:
- Describe the core concepts of the web framework Express.
- Configure middleware to control how a request is handled.
Prerequisites
Trebate pomoć? Pogledajte naš vodič za rješavanje problema ili pošaljite željene povratne informacije prijavljivanjem problema.