Building the API - Part 1

This chapter is meant to introduce the students to API building using Node.js. We will start by building a basic HTTP server to gain an understanding of how Node.js works.

By the end of this chapter, you will be able to:

  • Implement a basic HTTP server using the Node.js built-in http module
  • Implement a basic Hapi.js setup for an API
  • Describe the basic HTTP verbs and how they differ from each other
  • Implement various routes for the API, making use of the different HTTP verbs
  • Implement logging the web application
  • Validating API requests

Get Beginning API Development with Node.js now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.