Your first API, Hello World, will mainly focus on how to start the app that is going to serve as your web service. This chapter will describe file organization and folder structures so that we can create a more maintainable and scalable code base. Then, we will focus on how to define routes with a very classic Hello World output as a result of a web service call. Finally, we will show you the controller logic that is going to run when a certain endpoint is called.
Throughout this book, we are going to create a simple Order Management System (OMS), which will connect with a NoSQL database. The main output of this service is to expose a REST API. This chapter will start this engagement from a basic Hello World service, which will reshape itself accordingly.
The following topics will be covered in this chapter:
- Serving the app
- File structure
- Defining basic routes
- Controlling basic routes