At this point, our first Droplet is ready to use, but we can see our React Application using port 3000. In this recipe, we are going to learn how to configure Nginx in our server and how to implement a proxy to redirect the traffic from port 80 to 3000. This means that we won't need to specify our port directly anymore. PM2 (Node Production Process Manager) will help us to run our Node server in production securely. Generally, if we run Node directly with the node or babel-node command and there is an error in our app, this will crash and will stop working; PM2 restarts the Node server if an error occurs.
Configuring Nginx, PM2, and a domain in our Droplet
Getting Ready
For this recipe, we need to install PM2...