If you deploying the application on a DigitalOcean droplet, you’ll need to allow port 3000 to have incoming connections first. If you are using UFW on your droplet, you can use:
sudo ufw allow 3000/tcp
If you are using IPTables, you can do the following:
sudo iptables -A INPUT -p tcp --dport 3000 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
sudo iptables -A OUTPUT -p tcp --sport 3000 -m conntrack --ctstate ESTABLISHED -j ACCEPT
Once you know your firewall allows connections on port 3000 and you have started your application on that port, you should be able to load it with your droplet’s IP Address;
Where XXX.XXX.XXX.XXX is your IP address.
Now, there is a better way to do so. You can install Nginx and use it as a reverse proxy to port 3000. That way you can add a domain and once someone loads your application on the domain it will redirect them to port 3000 behind the scenes. Here is an article on how to firstly installed Nginx:
Then you can see in the tutorials section a bunch of Nginx Reverse proxy guides which you can follow depending on the app you are developing.
Now, if you are developing your application locally, on your computer and you want to see your progress. You’ll need to install the thing your app is working with. Let’s say you are using Node, you’ll need node installed locally, in order to make your app work locally as well.
Nginx is one of the most popular web servers in the world and is responsible for hosting some of the largest and highest-traffic sites on the internet. In this guide, we'll discuss how to get Nginx installed on your Ubuntu 20.04 server.