In the last few chapters, we created a robust user directory API, which is now ready to face the outside world. Thus, in this chapter, we'll learn how to expose our API to the World Wide Web (WWW). First, we will need to set up a Virtual Private Server (VPS) to host and serve our API, and associate it with a public, static IP address; we will achieve both of these goals using DigitalOcean (DO), a popular cloud provider. Then, to make it easier for our API consumers, we'll purchase a domain name from a domain registry, and configure its Domain Name System (DNS) records to resolve the domain name to the static IP.
By following this chapter, you will:
- Learn to set up and secure a VPS
- Learn about privileged ports
- Keep processes alive using PM2
- Set up NGINX as a reverse proxy to our API
- Understand the architecture of the DNS
- Purchase and configure a domain name