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